TCPDF
TCPDF copied to clipboard
Fix PHP 8.5 deprecation on curl_close()
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
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.