Fatal PHP error Unsupported operand types: string * string
-
Hi there,
Thanks for an excellent and really easy to use plugin. I have been using it with now problems for a while but have suddenly run into an issue where if I enable “Rewrite Media URLs” (I am using Cloudfront) then I get a fatal PHP error on the frontend. Debugging give me this error:Fatal error: Uncaught Error: Unsupported operand types: string * string in /var/app/current/wp-content/plugins/amazon-s3-and-cloudfront/classes/integrations/media-library.php on line 1203
This seems to indicate that wp_get_attachment_metadata isn’t returning valid dimensions?
The wp_get_attachment_metadata value in the database contains this array which seems to contain the correct dimensions.a:6:{s:5:"width";i:566;s:6:"height";i:450;s:4:"file";s:36:"2022/08/62cc37c908f43219140781-6.jpg";s:8:"filesize";i:18577;s:5:"sizes";a:2:{s:6:"medium";a:5:{s:4:"file";s:36:"62cc37c908f43219140781-6-400x318.jpg";s:5:"width";i:400;s:6:"height";i:318;s:9:"mime-type";s:10:"image/jpeg";s:8:"filesize";i:21092;}s:9:"thumbnail";a:5:{s:4:"file";s:36:"62cc37c908f43219140781-6-150x150.jpg";s:5:"width";i:150;s:6:"height";i:150;s:9:"mime-type";s:10:"image/jpeg";s:8:"filesize";i:7102;}}s:10:"image_meta";a:12:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";s:11:"orientation";s:1:"0";s:8:"keywords";a:0:{}}}
I have disabled all plugins and set a default theme but am getting a consistent error. Any suggestions would be most welcome. Thanks
- The topic ‘Fatal PHP error Unsupported operand types: string * string’ is closed to new replies.