diff options
author | Joas Schilling <coding@schilljs.com> | 2024-04-23 12:17:55 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-04-24 07:01:57 +0200 |
commit | cdb40a3110877ba2fdabdc850d11ad79d91e7ee8 (patch) | |
tree | 7ee52790772a1cd301a0e55320a6ea675413c437 /lib/private/Files | |
parent | 144936abfdbb4bb6ca644f9d58544e73249813ea (diff) | |
download | nextcloud-server-cdb40a3110877ba2fdabdc850d11ad79d91e7ee8.tar.gz nextcloud-server-cdb40a3110877ba2fdabdc850d11ad79d91e7ee8.zip |
fix(openstack): Fix psalm issue with updated openstack version
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Files')
-rw-r--r-- | lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php b/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php index b1478762550..3df1aee090f 100644 --- a/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php +++ b/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php @@ -25,11 +25,14 @@ declare(strict_types=1); */ namespace OC\Files\ObjectStore; +use OpenStack\Common\Auth\Token; use OpenStack\Identity\v2\Service; class SwiftV2CachingAuthService extends Service { public function authenticate(array $options = []): array { - if (!empty($options['v2cachedToken'])) { + if (isset($options['v2cachedToken'], $options['v2serviceUrl']) + && $options['v2cachedToken'] instanceof Token + && is_string($options['v2serviceUrl'])) { return [$options['v2cachedToken'], $options['v2serviceUrl']]; } else { return parent::authenticate($options); |