From 376734c8a72d96999b8cd36d019414955438bb99 Mon Sep 17 00:00:00 2001 From: Mat Jones Date: Tue, 12 Mar 2024 09:48:34 -0500 Subject: [PATCH] Resolve Mark-H's nitpick --- core/src/Revolution/Sources/modS3MediaSource.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/core/src/Revolution/Sources/modS3MediaSource.php b/core/src/Revolution/Sources/modS3MediaSource.php index 15392e2b32d..b91103a4752 100644 --- a/core/src/Revolution/Sources/modS3MediaSource.php +++ b/core/src/Revolution/Sources/modS3MediaSource.php @@ -55,15 +55,13 @@ public function initialize() try { $client = new S3Client($config); - if (!$noBucketCheck) { - if (!$client->doesBucketExist($bucket)) { - $this->xpdo->log( - xPDO::LOG_LEVEL_ERROR, - $this->xpdo->lexicon('source_err_init', ['source' => $this->get('name')]) - ); - - return false; - } + if (!$noBucketCheck && !$client->doesBucketExist($bucket)) { + $this->xpdo->log( + xPDO::LOG_LEVEL_ERROR, + $this->xpdo->lexicon('source_err_init', ['source' => $this->get('name')]) + ); + + return false; } $adapter = new AwsS3V3Adapter(new S3Client($config), $bucket, $prefix); $this->loadFlySystem($adapter);