From: Côme Chilliet Date: Mon, 23 Oct 2023 13:52:07 +0000 (+0200) Subject: Allow passing null to PublicKeyToken::setScope, fixes tests X-Git-Tag: v28.0.0beta1~80^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d8b42c613164c1155082127e3644767c6be601f2;p=nextcloud-server.git Allow passing null to PublicKeyToken::setScope, fixes tests Signed-off-by: Côme Chilliet --- diff --git a/lib/private/Authentication/Token/PublicKeyToken.php b/lib/private/Authentication/Token/PublicKeyToken.php index 198990cdd95..b77a856589d 100644 --- a/lib/private/Authentication/Token/PublicKeyToken.php +++ b/lib/private/Authentication/Token/PublicKeyToken.php @@ -187,11 +187,11 @@ class PublicKeyToken extends Entity implements INamedToken, IWipeableToken { return $scope; } - public function setScope(string|array $scope): void { + public function setScope(array|string|null $scope): void { if (is_array($scope)) { parent::setScope(json_encode($scope)); } else { - parent::setScope($scope); + parent::setScope((string)$scope); } }