WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.9 R25 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.13.x) »
  • Modules »
  • PHP 8.5.x - Warning in Droplet Text2Image
  • Print
Pages: [1]   Go Down

Author Topic: PHP 8.5.x - Warning in Droplet Text2Image  (Read 45 times)

Offline jacobi22

  • Posts: 5922
PHP 8.5.x - Warning in Droplet Text2Image
« on: December 20, 2025, 11:34:33 AM »
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"

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: [Select]
imagedestroy($image_handle);
alternativ: das Voranstellen eines @, z.b. so (Ergebnis abhängig von den Einstellung der PHP-Fehlerausgabe in den WB-Optionen)
Code: [Select]
@\imagedestroy($this->oldImage);

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"

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: [Select]
imagedestroy($image_handle);
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: [Select]
@\imagedestroy($this->oldImage);*** Translated with www.DeepL.com/Translator (free version) ***

Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.13.x) »
  • Modules »
  • PHP 8.5.x - Warning in Droplet Text2Image
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2