Please fill out the sections below to help us address your issue.
3.125
php -v)?7.4
Trying to access array offset on value of type null in /srv/www/vendor/aws/aws-sdk-php/src/RetryMiddleware.php:146
I don't currently have a good way to reproduce this.
But, looking at the RetryMiddleware class, there are many things to note. Firstly, it's not typed at all, so $result could literally be anything and it's not even verified to be a legitimate value before attempting to access array keys on it.
Having the same issue.
AWS SDK version 3.126.0
Laravel 6.6.1
PHP 7.4
I get the issue in this line $s3->createPresignedRequest($cmd, '+5 minutes'); in code snippet below
$cmd = $s3->getCommand('GetObject', [
'Bucket' => env('AWS_BUCKET'),
'Key' => $mediaRecord->getPath(),
]);
$request = $s3->createPresignedRequest($cmd, '+5 minutes');
@SelimSalihovic you can set the retry attempts config on the S3Client to zero to bypass this for now. It's a hack that'll be okay in most cases, but it'll silence this error until this is resolved.
Getting the same thing as well, thanks for the hack @oojacoboo
We just merged a fix in #1916, which will be included in the next release. Thanks for bringing this to our attention!
Most helpful comment
We just merged a fix in #1916, which will be included in the next release. Thanks for bringing this to our attention!