Skip to content

Commit 5f6f5ff

Browse files
committed
config bug fixed
add a empty config array to test app
1 parent 37dc939 commit 5f6f5ff

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Aws/Laravel/AwsServiceProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function register()
3535
{
3636
$this->app['aws'] = $this->app->share(function ($app) {
3737
// Instantiate the AWS service builder
38-
$config = (isset($app['config']) && isset($app['config']['aws'])) ? $app['config']['aws'] : array();
38+
$config = !empty($app['config']['aws']) ? $app['config']['aws'] : array();
3939
$aws = Aws::factory($config);
4040

4141
// Attach an event listener that will append the Laravel version number in the user agent string

tests/Aws/Laravel/Tests/AwsServiceProviderTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public function testNoConfigProvided()
6464
{
6565
// Setup the Laravel app and AWS service provider
6666
$app = new Application();
67+
$app['config'] = array();
6768
$provider = new AwsServiceProvider($app);
6869
$app->register($provider);
6970
$provider->boot();

0 commit comments

Comments
 (0)