Problem/Motivation
I'm getting this PHP warning on articles containing media entities.
Warning: Undefined array key "0770" in Twistor\Flysystem\Plugin\Stat->mergeMeta() (line 157 of vendor/twistor/flysystem-stream-wrapper/src/Flysystem/Plugin/Stat.php).
In this flysystem plugin, it's expecting a "visibility" of a code that corresponds to either "public" or "private". Instead of one of those, the files have a visibility of 0770, which apparently in some file systems is used as a "custom" file permission which then can have further handling done. So I added a line that says if it's 0770 then we're going to say it's "public" (because these files should be public).
This doesn't seem like an ideal solution, but it does prevent the warning. If anyone has a better solution or thoughts on what causes it, I'd love to hear them.
Steps to reproduce
I'm actually not sure if this is particular to our environment. This occurs on Pantheon environments using flysystem_s3.
Upgrade to PHP 8.1. Create a node that has a media item attached that uses flysystem_s3.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3348264-php-warning-undefined-array-key.patch | 560 bytes | ltrain |
Comments
Comment #2
ltrainComment #3
geoanders commentedComment #4
lisa.rae commentedComment #5
lisa.rae commentedComment #6
lisa.rae commentedPostponing to 3.0, likely will not be needed as the dependency on twistor/flysystem-stream-wrapper will no longer be present.
Comment #7
lisa.rae commentedFixed in release 2.3
Comment #8
lisa.rae commentedUpdating issue for attribution