WebsiteBaker Support (2.13.x) > Modules
PHP 8.5.x - Warning in Droplet Text2Image
(1/1)
jacobi22:
Nur zur Info für diejenigen, die dieses Droplet Text2Image benutzen. (gilt analog für eigene Script, die curl... benutzen)
PHP 8.5 hat einige Funktionen abgeschafft bzw umgewandelt, die zur Speicherbereinigung nach Aktionen verwendet wurden, darunter imagedestroy() oder curl_close().
Die Speicherbereinigung wird ab PHP 8.5 von PHP selbst und automatisch durchgeführt, es bedarf dieser extra Funktion nicht mehr.
Mit eingeschalteter PHP-Fehleranzeige wird es Warnungen ähnlich dieser hier geben
--- Quote ---eval "Function imagedestroy() is deprecated since 8.5, as it has no effect since PHP 8.0"
--- End quote ---
Coreseitig werden wir diese Stellen natürlich bereinigen, bei Droplets oder user-eigenen Scripten ist das natürlich nicht möglich.
Abhilfe schafft (i.d.R.) die Entfernung solcher Zeilen, die nun nicht mehr benötigt werden, oft so etwas
--- Code: ---imagedestroy($image_handle);
--- End code ---
alternativ: das Voranstellen eines @, z.b. so (Ergebnis abhängig von den Einstellung der PHP-Fehlerausgabe in den WB-Optionen)
--- Code: ---@\imagedestroy($this->oldImage);
--- End code ---
engl.
Just for the information of those who use this Text2Image droplet. (This also applies to your own scripts that use curl...)
PHP 8.5 has removed or changed some functions that were used for memory cleanup after actions, including imagedestroy() and curl_close().
From PHP 8.5 onwards, memory clean-up is performed automatically by PHP itself, so this extra function is no longer necessary.
With PHP error display enabled, you will see warnings similar to this one
--- Quote ---eval "Function imagedestroy() is deprecated since 8.5, as it has no effect since PHP 8.0"
--- End quote ---
We will of course clean up these places on the core side, but this is not possible for Droplets or user-owned scripts.
The remedy (usually) is to remove lines that are no longer needed, often something like this
--- Code: ---imagedestroy($image_handle);
--- End code ---
Alternatively, you can prefix them with an @, e.g. like this (the result depends on the PHP error output settings in the WB options)
--- Code: ---@\imagedestroy($this->oldImage);
--- End code ---
*** Translated with www.DeepL.com/Translator (free version) ***
Navigation
[0] Message Index
Go to full version