Explorar el Código

Change: PHP 8.5: GdImage freed automatically

https://www.php.net/manual/en/migration85.deprecated.php#migration85.deprecated.gd
Berbe hace 2 semanas
padre
commit
545136665c
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      lib/Vizhash16x16.php

+ 3 - 1
lib/Vizhash16x16.php

@@ -123,7 +123,9 @@ class Vizhash16x16
         imagepng($image);
         imagepng($image);
         $imagedata = ob_get_contents();
         $imagedata = ob_get_contents();
         ob_end_clean();
         ob_end_clean();
-        imagedestroy($image);
+        if (version_compare(PHP_VERSION, '8.5', '<') && defined('imagedestroy')) {
+            imagedestroy($image);
+        }
 
 
         return $imagedata;
         return $imagedata;
     }
     }