statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

Unable to create S3 Asset container on php 7.4 #2510

Open jarred opened 4 years ago

jarred commented 4 years ago

Creating an asset S3 asset container on php 7.4 results in the following error

ErrorException in RetryMiddleware.php line 145:
Trying to access array offset on value of type null

Have tried via the control panel and the cli to the same result.

It looks like this might be fixed in a newer version of aws-sdk-php

https://github.com/aws/aws-sdk-php/issues/1915 https://github.com/aws/aws-sdk-php/pull/1916

But I am not sure if this has yet made it through into thephpleague/flysystem-aws-s3-v3 which Statamic uses.

Removing the created <container-name>.yaml file renders the cp usable again.

Thank you for any help.


Some steps to reproduce below.

Screen Shot 2020-03-31 at 6 37 05 AM Screen Shot 2020-03-31 at 7 01 43 AM
jbrhel commented 4 years ago

Running composer update aws/aws-sdk-php within statamic folder solved this issue. But it's not reccomended aproach how to handle statamic updates.

aryehraber commented 4 years ago

We just hit this issue too, the above suggestion fixed it.

Hoping this can be "officially" fixed by bumping the version in the packaged Statamic build so that future upgrades don't break our sites again 😱

tyfuji commented 3 years ago

This fixed the issue for us as well, would love for this to make it into statamic core.