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 committed Jun 26, 2023
1 parent 783f1b9 commit f208387
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Files/ObjectStore/S3ConnectionTrait.php
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 f208387

Please sign in to comment.