TCPDF icon indicating copy to clipboard operation
TCPDF copied to clipboard

Fix PHP 8.5 deprecation on curl_close()

Open mpesari opened this issue 5 months ago • 2 comments

curl_close() is noop since 8.0.0 and emits E_DEPRECATED since 8.5.0.

This changes the code to call curl_close() only on PHP < 8.0.0.

  • https://www.php.net/curl_close
  • https://github.com/php/php-src/blob/php-8.0.0/UPGRADING#L1016-L1020
  • https://github.com/php/php-src/blob/php-8.5.0/UPGRADING#L416-L418

mpesari avatar Nov 25 '25 21:11 mpesari

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 25 '25 21:11 CLAassistant

Same should be done with imagedestroy. See attached patch. patch.diff.zip

There is code that checks for 'safe_mode', which was removed in PHP 5.4 (not fixed in patch). Encryption/decryption may also not work but I have no code that uses this, so I have not tested/fixed it.

MacGritsch avatar Dec 03 '25 07:12 MacGritsch