Error when using S3 storage in middleware

Created on 17 November 2020, about 4 years ago
Updated 19 October 2023, about 1 year ago

Problem/Motivation

When using an S3 storage in context of a middleware (very early in the request flow), an error occurs:

Error: Call to a member function getScheme() on null in Drupal\flysystem_s3\Flysystem\S3::mergeConfiguration() (line 164 of modules/contrib/flysystem_s3/src/Flysystem/S3.php).

Steps to reproduce

Use an S3 storage in context of a middleware.

Proposed resolution

Check if a request exists in the request stack before calling a method on it.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024