From c90f10e66f2cebc9886a572b11cea5fa3d25efd5 Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Tue, 16 Jan 2024 22:54:14 +0700 Subject: [PATCH] [PHP 8.4] Fix: Curl `CURLOPT_BINARYTRANSFER` deprecated 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](https://github.com/php/php-src/commit/fc16285538e96ecb35d017231051f83dcbd8b55b) --- include/tcpdf_static.php | 1 - 1 file changed, 1 deletion(-) diff --git a/include/tcpdf_static.php b/include/tcpdf_static.php index 4c28850e..3a5cc8df 100644 --- a/include/tcpdf_static.php +++ b/include/tcpdf_static.php @@ -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'))) {