mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
If there are no scopes to format then just return an empty array
This commit is contained in:
@@ -137,6 +137,10 @@ abstract class AbstractTokenEntity
|
|||||||
*/
|
*/
|
||||||
protected function formatScopes($unformatted = [])
|
protected function formatScopes($unformatted = [])
|
||||||
{
|
{
|
||||||
|
if (is_null($unformatted)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
$scopes = [];
|
$scopes = [];
|
||||||
foreach ($unformatted as $scope) {
|
foreach ($unformatted as $scope) {
|
||||||
if ($scope instanceof ScopeEntity) {
|
if ($scope instanceof ScopeEntity) {
|
||||||
|
Reference in New Issue
Block a user