Little bug fix

This commit is contained in:
Alex Bilbie 2014-01-17 10:37:05 +00:00
parent 20df1f50a6
commit 9de979a4ee

View File

@ -156,9 +156,11 @@ class Session
private function formatScopes($unformated = []) private function formatScopes($unformated = [])
{ {
$scopes = []; $scopes = [];
foreach ($unformated as $scope) { if (is_array($unformated)) {
if ($scope instanceof Scope) { foreach ($unformated as $scope) {
$scopes[$scope->getId()] = $scope; if ($scope instanceof Scope) {
$scopes[$scope->getId()] = $scope;
}
} }
} }
return $scopes; return $scopes;