Skip to content

Commit

Permalink
fix(s3): fix handling verify_bucket_exists parameter
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tcitworld authored and susnux committed Aug 2, 2023
1 parent 8fa9607 commit c2fc3b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Files/ObjectStore/S3ConnectionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c2fc3b8

Please sign in to comment.