Skip to content

Commit

Permalink
Resolve Mark-H's nitpick
Browse files Browse the repository at this point in the history
  • Loading branch information
matdave committed Mar 12, 2024
1 parent e4c3209 commit 376734c
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions core/src/Revolution/Sources/modS3MediaSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {

Check warning on line 58 in core/src/Revolution/Sources/modS3MediaSource.php

View check run for this annotation

Codecov / codecov/patch

core/src/Revolution/Sources/modS3MediaSource.php#L58

Added line #L58 was not covered by tests
$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);
Expand Down

0 comments on commit 376734c

Please sign in to comment.