humanmade / tachyon

Faster than light image resizing service that runs on AWS. Super simple to set up, highly available and very performant.

Home Page:https://engineering.hmn.md/projects/tachyon/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP Warning: Trying to access array offset on value of type bool

robindevitt opened this issue · comments

During some testing for Altis V13 ( testing on V12 too ) there are the following PHP warnings:

PHP Warning:  Trying to access array offset on value of type bool in /usr/src/app/vendor/humanmade/tachyon-plugin/inc/class-tachyon.php on line 631
PHP Warning:  Trying to access array offset on value of type bool in /usr/src/app/vendor/humanmade/tachyon-plugin/inc/class-tachyon.php on line 632
PHP Warning:  Trying to access array offset on value of type bool in /usr/src/app/vendor/humanmade/tachyon-plugin/inc/class-tachyon.php on line 635
PHP Warning:  Trying to access array offset on value of type bool in /usr/src/app/vendor/humanmade/tachyon-plugin/inc/class-tachyon.php on line 635
PHP Warning:  Trying to access array offset on value of type bool in /usr/src/app/vendor/humanmade/tachyon-plugin/inc/class-tachyon.php on line 653
PHP Warning:  Trying to access array offset on value of type bool in /usr/src/app/vendor/humanmade/tachyon-plugin/inc/class-tachyon.php on line 653

Steps to reproduce

  1. Ensure your install is running either Altis V13 or Altis V12. ( Getting started or Upgrade guide )
  2. Upload a new image to the media library.
  3. Observe the php logs. composer server logs php for the above mentioned warnings. ( viewing logs )

This only occurs once when an image is initially uploaded.

Acceptance criteria

  • Upload an image and see no php warnings.

This seemed to be fixed by a recent PR by KAdam: humanmade/tachyon-plugin@8202841

Testing getting blocked by a different error when uploading

Fatal error: Uncaught Exception: Error executing "ListObjects" on "https://s3-tachyon-test.altis.dev/s3-tachyon-test//?delimiter=%2F&prefix=uploads%2F2022%2F11%2Fa&encoding-type=url"; AWS HTTP error: Client error: `GET https://s3-tachyon-test.altis.dev/s3-tachyon-test//?delimiter=%2F&prefix=uploads%2F2022%2F11%2Fa&encoding-type=url` resulted in a `400 Bad Request` response:
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>XMinioInvalidObjectName</Code><Message>Object name contains unsuppor (truncated...)
XMinioInvalidObjectName (client): Object name contains unsupported characters. - <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>XMinioInvalidObjectName</Code><Message>Object name contains unsupported characters.</Message><BucketName>s3-tachyon-test</BucketName><Resource>/s3-tachyon-test//</Resource><Region>us-east-1</Region><RequestId>17284A7BBAE69FAE</RequestId><HostId>67513999-84ff-4e9e-a421-925f5f9e759f</HostId></Error>
in /usr/src/app/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php on line 195

Investigating

I spent more time on this to try identify the issue. Posted my findings to the other ticket humanmade/altis-local-server#542

TLDR: Uploading works after if local-server is rolled back to to v10. I did not find the change the affected this functionality yet.

Confirmed that humanmade/tachyon-plugin@8202841 fixed this issue.

Looks like this can be closed based on confirmation of the fix.