Skip to content

Commit

Permalink
config bug fixed
Browse files Browse the repository at this point in the history
add a empty config array to test app
  • Loading branch information
aykutfarsak committed Mar 11, 2013
1 parent 37dc939 commit 5f6f5ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Aws/Laravel/AwsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function register()
{
$this->app['aws'] = $this->app->share(function ($app) {
// Instantiate the AWS service builder
$config = (isset($app['config']) && isset($app['config']['aws'])) ? $app['config']['aws'] : array();
$config = !empty($app['config']['aws']) ? $app['config']['aws'] : array();
$aws = Aws::factory($config);

// Attach an event listener that will append the Laravel version number in the user agent string
Expand Down
1 change: 1 addition & 0 deletions tests/Aws/Laravel/Tests/AwsServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function testNoConfigProvided()
{
// Setup the Laravel app and AWS service provider
$app = new Application();
$app['config'] = array();
$provider = new AwsServiceProvider($app);
$app->register($provider);
$provider->boot();
Expand Down

0 comments on commit 5f6f5ff

Please sign in to comment.