Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
Changed AWS S3 adapter to not override default S3 config if not set
Browse files Browse the repository at this point in the history
  • Loading branch information
dmyers committed Sep 5, 2014
1 parent b967b78 commit c239b7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/Dmyers/Storage/Adapter/AmazonS3.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public function __construct()
{
$key = $this->config('key');

$region = $this->config('region');

if (empty($key)) {
throw new \RuntimeException('AmazonS3 key config required.');
}
Expand All @@ -21,12 +23,6 @@ public function __construct()
if (empty($secret)) {
throw new \RuntimeException('AmazonS3 secret config required.');
}

$region = $this->config('region');

if (empty($region)) {
throw new \RuntimeException('AmazonS3 region config required.');
}

$bucket = $this->config('bucket');

Expand Down
2 changes: 1 addition & 1 deletion src/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'amazons3' => array(
'key' => '',
'secret' => '',
'region' => 'us-east-1',
'region' => '',
'bucket' => '',
'acl' => 'public-read',
),
Expand Down

0 comments on commit c239b7d

Please sign in to comment.