From 3f28fc58aaf0e70e5630df879ef5edbbebf5c90b Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 26 Jun 2023 16:43:07 +0200 Subject: [PATCH] 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 --- lib/private/Files/ObjectStore/S3ConnectionTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Files/ObjectStore/S3ConnectionTrait.php b/lib/private/Files/ObjectStore/S3ConnectionTrait.php index deb03571c7624..49942b385bcda 100644 --- a/lib/private/Files/ObjectStore/S3ConnectionTrait.php +++ b/lib/private/Files/ObjectStore/S3ConnectionTrait.php @@ -92,7 +92,7 @@ protected function parseParams($params) { 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; }