aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-10-23 15:52:07 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-10-23 15:52:07 +0200
commitd8b42c613164c1155082127e3644767c6be601f2 (patch)
tree022b4917cf56b16529ce2048d9dc6cb2500bda37
parent33a24134a7cb6b7af08a097a5807c58888cba8c6 (diff)
downloadnextcloud-server-d8b42c613164c1155082127e3644767c6be601f2.tar.gz
nextcloud-server-d8b42c613164c1155082127e3644767c6be601f2.zip
Allow passing null to PublicKeyToken::setScope, fixes tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--lib/private/Authentication/Token/PublicKeyToken.php4
1 files changed, 2 insertions, 2 deletions
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);
}
}