From ff1ecd1723f1ccfb21d42afb79d900e2e7470847 Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Tue, 16 Jan 2024 22:51:51 +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) --- lib/Service/CurlService.php | 1 - lib/Tools/Traits/TRequest.php | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/Service/CurlService.php b/lib/Service/CurlService.php index b10afa7c..882fa404 100644 --- a/lib/Service/CurlService.php +++ b/lib/Service/CurlService.php @@ -398,7 +398,6 @@ class CurlService { curl_setopt($curl, CURLOPT_TIMEOUT, $request->getTimeout()); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); - curl_setopt($curl, CURLOPT_BINARYTRANSFER, $request->isBinary()); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $request->isVerifyPeer()); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, $request->isFollowLocation()); diff --git a/lib/Tools/Traits/TRequest.php b/lib/Tools/Traits/TRequest.php index 4b7c26aa..7fa9ba9c 100644 --- a/lib/Tools/Traits/TRequest.php +++ b/lib/Tools/Traits/TRequest.php @@ -136,7 +136,6 @@ trait TRequest { curl_setopt($curl, CURLOPT_TIMEOUT, $request->getTimeout()); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); - curl_setopt($curl, CURLOPT_BINARYTRANSFER, $request->isBinary()); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $request->isVerifyPeer()); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, $request->isFollowLocation());