DivaVocals / zen_Image-Handler

Image Handler 4 is really meant to ease the management of product images (particularly the management of additional product images), and to help improve page performance by optimizing the product images.
GNU General Public License v2.0
7 stars 13 forks source link

Fatal Error when running php 8.0 #212

Closed proseLA closed 3 years ago

proseLA commented 3 years ago

https://github.com/DivaVocals/zen_Image-Handler/blob/bd4ae1ce4d3e84933e782dbea8efc3008190d8ba/1_Installation_Files%20(v1.5.5)/includes/classes/bmz_image_handler.class.php#L885

when running a test site on php8, i am sporadically getting the following:

--> PHP Fatal error: Uncaught Error: Object of class GdImage could not be converted to string in /var/www/testing/includes/classes/bmz_image_handler.class.php:885

which i have tracked down to the $image var in the expression. a print_r of the var in php 8 gives: GdImage Object ( ) while in php 7, it gives Resource id #389.

drbyte commented 3 years ago

PHP 8 changed from GD Resources to Objects: https://www.php.net/manual/en/migration80.incompatible.php#migration80.incompatible.resource2object

lat9 commented 3 years ago

Thanks for the report and the pointer.