diff options
Diffstat (limited to 'lib/private/Authentication/Token/DefaultToken.php')
-rw-r--r-- | lib/private/Authentication/Token/DefaultToken.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Authentication/Token/DefaultToken.php b/lib/private/Authentication/Token/DefaultToken.php index ad4ece0c463..e2753ba979c 100644 --- a/lib/private/Authentication/Token/DefaultToken.php +++ b/lib/private/Authentication/Token/DefaultToken.php @@ -158,9 +158,11 @@ class DefaultToken extends Entity implements IToken { return $scope; } - public function setScope(array $scope = null) { - if ($scope !== null) { + public function setScope($scope) { + if (\is_array($scope)) { parent::setScope(json_encode($scope)); + } else { + parent::setScope((string)$scope); } } |