TCPDF icon indicating copy to clipboard operation
TCPDF copied to clipboard

imagedestroy() deprecated since PHP 8.5

Open dennis-fedco opened this issue 2 months ago • 2 comments

PHP Version: 8.5 TCPDF Version: 6.10.1 Problem: imagedestroy() deprecated since PHP 8.5

Error: Deprecated: Function imagedestroy() is deprecated since 8.5, as it has no effect since PHP 8.0 in tcpdf\tcpdf.php on line 7440

Context: imagedestroy() became a no-op in PHP 8.0 and was formally deprecated in PHP 8.5.

Suggested fix: Remove imagedestroy() calls. For backwards compatibility wrap in version check: if (PHP_VERSION_ID < 80000) { imagedestroy($img); }

dennis-fedco avatar Dec 18 '25 19:12 dennis-fedco

See

  • #838
  • #839
  • #835

williamdes avatar Dec 18 '25 23:12 williamdes

Patch posted on https://github.com/tecnickcom/TCPDF/pull/838#issuecomment-3605402007

If you want to help, please open a pull request with the patch

williamdes avatar Dec 18 '25 23:12 williamdes