Skip to content

Commit

Permalink
Fix for NOTICE with S3 compatible services that don't send the correc…
Browse files Browse the repository at this point in the history
…t headers
  • Loading branch information
jawngee committed Mar 5, 2020
1 parent 95df56a commit 3cd7145
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/S3/S3ClientTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public function determineBucketRegionAsync($bucketName)

return $handler($command)
->then(static function (ResultInterface $result) {
return $result['@metadata']['headers']['x-amz-bucket-region'];
return (isset($result['@metadata']['headers']['x-amz-bucket-region'])) ? $result['@metadata']['headers']['x-amz-bucket-region'] : null;
}, function (AwsException $e) {
$response = $e->getResponse();
if ($response === null) {
Expand Down

0 comments on commit 3cd7145

Please sign in to comment.