diff options
author | Thomas Citharel <tcit@tcit.fr> | 2023-06-26 16:43:07 +0200 |
---|---|---|
committer | Daniel <mail@danielkesselberg.de> | 2023-08-31 21:36:03 +0200 |
commit | 3f28fc58aaf0e70e5630df879ef5edbbebf5c90b (patch) | |
tree | 59ecce99d53d23cd88018389222ebdcaf5ac227b /lib/private/Files/ObjectStore | |
parent | a3d37c531a91f39ade3c6c9aa860744bfd452097 (diff) | |
download | nextcloud-server-3f28fc58aaf0e70e5630df879ef5edbbebf5c90b.tar.gz nextcloud-server-3f28fc58aaf0e70e5630df879ef5edbbebf5c90b.zip |
fix(s3): fix handling verify_bucket_exists parameter
If 'verify_bucket_exists' is set to false in the config.php s3 configuration, it's supposed to avoid
verifying that the bucket exists. However empty(falsy) will always return true, so this condition
would not work.
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'lib/private/Files/ObjectStore')
-rw-r--r-- | lib/private/Files/ObjectStore/S3ConnectionTrait.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/ObjectStore/S3ConnectionTrait.php b/lib/private/Files/ObjectStore/S3ConnectionTrait.php index deb03571c76..49942b385bc 100644 --- a/lib/private/Files/ObjectStore/S3ConnectionTrait.php +++ b/lib/private/Files/ObjectStore/S3ConnectionTrait.php @@ -92,7 +92,7 @@ trait S3ConnectionTrait { if (!isset($params['port']) || $params['port'] === '') { $params['port'] = (isset($params['use_ssl']) && $params['use_ssl'] === false) ? 80 : 443; } - $params['verify_bucket_exists'] = empty($params['verify_bucket_exists']) ? true : $params['verify_bucket_exists']; + $params['verify_bucket_exists'] = $params['verify_bucket_exists'] ?? true; $this->params = $params; } |