Skip to content

Commit

Permalink
Allow passing null to PublicKeyToken::setScope, fixes tests
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Oct 23, 2023
1 parent 33a2413 commit d8b42c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/Authentication/Token/PublicKeyToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ public function getScopeAsArray(): array {
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);
}
}

Expand Down

0 comments on commit d8b42c6

Please sign in to comment.