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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy