Skip to content

Commit

Permalink
[PHP 8.4] Fix: Curl CURLOPT_BINARYTRANSFER deprecated
Browse files Browse the repository at this point in the history
The `CURLOPT_BINARYTRANSFER` PHP constant from the Curl extension was no-op since
PHP 5.1, and is deprecated in PHP 8.4. This removes the constant usage to avoid
the deprecation notice in PHP 8.4 and later.

Because this constant was no-op since PHP 5.1 (circa 2005), this change has no
impact.

See:

 - [PHP.Watch - PHP 8.4 - Curl: CURLOPT_BINARYTRANSFER deprecated](https://php.watch/versions/8.4/CURLOPT_BINARYTRANSFER-deprecated)
 - [commit](php/php-src@fc16285)
  • Loading branch information
Ayesh committed Jan 16, 2024
1 parent 5fce932 commit c90f10e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion include/tcpdf_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -1958,7 +1958,6 @@ public static function fileGetContents($file) {
// try to get remote file data using cURL
$crs = curl_init();
curl_setopt($crs, CURLOPT_URL, $path);
curl_setopt($crs, CURLOPT_BINARYTRANSFER, true);
curl_setopt($crs, CURLOPT_FAILONERROR, true);
curl_setopt($crs, CURLOPT_RETURNTRANSFER, true);
if ((ini_get('open_basedir') == '') && (!ini_get('safe_mode'))) {
Expand Down

0 comments on commit c90f10e

Please sign in to comment.