Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined index: http in AwsS3Provider.php:140 #96

Closed
crarau opened this issue Jun 25, 2016 · 4 comments · Fixed by #97
Closed

Undefined index: http in AwsS3Provider.php:140 #96

crarau opened this issue Jun 25, 2016 · 4 comments · Fixed by #97

Comments

@crarau
Copy link

crarau commented Jun 25, 2016

I'm getting the error below. Is it something that I'm doing wrong? Using the latest codebase.

production.ERROR: ErrorException: Undefined index: http in /srv/wisk/wisksol/vendor/vinelab/cdn/src/Vinelab/Cdn/Providers/AwsS3Provider.php:140
Stack trace:
#0 /srv/wisk/wisksol/vendor/vinelab/cdn/src/Vinelab/Cdn/Providers/AwsS3Provider.php(140): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Undefined index...', '/srv/wisk/wisks...', 140, Array)
#1 /srv/wisk/wisksol/vendor/vinelab/cdn/src/Vinelab/Cdn/ProviderFactory.php(50): Vinelab\Cdn\Providers\AwsS3Provider->init(Array)
#2 /srv/wisk/wisksol/vendor/vinelab/cdn/src/Vinelab/Cdn/CdnFacade.php(170): Vinelab\Cdn\ProviderFactory->create(Array)
#3 /srv/wisk/wisksol/vendor/vinelab/cdn/src/Vinelab/Cdn/CdnFacade.php(64): Vinelab\Cdn\CdnFacade->init()
#4 [internal function]: Vinelab\Cdn\CdnFacade->__construct(Object(Vinelab\Cdn\ProviderFactory), Object(Vinelab\Cdn\CdnHelper), Object(Vinelab\Cdn\Validators\CdnFacadeValidator))
#5 /srv/wisk/wisksol/bootstrap/cache/compiled.php(1306): ReflectionClass->newInstanceArgs(Array)

Thanks,
Chip.

@Mulkave
Copy link
Member

Mulkave commented Jun 27, 2016

Please update to v1.4.3, attempts to solve this issue.

@alexc-hollywood
Copy link

alexc-hollywood commented Jun 28, 2016

Getting the same, and on dev branch using * or 1.4.3. Issue appears to be caused by the config file - there's no "http" array key under the S3 config section.

ErrorException in AwsS3Provider.php line 140:
Undefined index: http

  • Updating vinelab/cdn dev-master (c92b281 => 802dfae)
    Checking out 802dfae
    Pulling in changes:
    802dfae - Abed Halawi: any of 2.* or 3.* for symfony components should work
    3be5c0a - Abed Halawi: fix aws s3 provider tests by adding http config param
    65b7748 - Abed Halawi: php 7 supported and failure is only allowed for hhvm
    c0094c3 - Abed Halawi: fix an issue for non-pem users
  • Updating vinelab/cdn (dev-master 802dfae => v1.4.3)
    Checking out 802dfae

@Mulkave
Copy link
Member

Mulkave commented Jun 29, 2016

weird, the attempt to solve this was to add an http to the defaults as in here: https://github.com/Vinelab/cdn/blob/master/src/Vinelab/Cdn/Providers/AwsS3Provider.php#L52

which will be merged with the config later on so regardless of whether there's an http in the config or not it should be working: https://github.com/Vinelab/cdn/blob/master/src/Vinelab/Cdn/Providers/AwsS3Provider.php#L129

can you please check your composer.lock file, check for the commit of vinelab/cdn that's been installed on your side? Thanks!

@marcaube
Copy link
Contributor

@Mulkave that's not quite how array_merge works with recursive arrays, e.g.

$default = [
    'foo' => [
        'bar' => 1,
        'baz' => 2
    ]
];

$configurations = [
    'foo' => [
        'qux' => 3
    ]
];

array_merge($default, $configurations); // ['foo' => ['qux' => 3]]

First-level elements of the first array will be replaced entirely by elements of the second array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants