If there are no scopes to format then just return an empty array

This commit is contained in:
Alex Bilbie 2014-09-10 17:22:01 +01:00
parent be51cdf9b1
commit 9e2a6ed238

View File

@ -137,6 +137,10 @@ abstract class AbstractTokenEntity
*/
protected function formatScopes($unformatted = [])
{
if (is_null($unformatted)) {
return [];
}
$scopes = [];
foreach ($unformatted as $scope) {
if ($scope instanceof ScopeEntity) {