From f8f2e3fc8b2e617a4f4307b320c70990acd26f50 Mon Sep 17 00:00:00 2001 From: Pieter Hoste Date: Mon, 1 Jun 2026 11:14:01 +0200 Subject: [PATCH] Don't call curl_close on PHP 8.0 or higher, it doesn't do anything and got deprecated in PHP 8.5 --- lib/OpenPayU/HttpCurl.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/OpenPayU/HttpCurl.php b/lib/OpenPayU/HttpCurl.php index 86f50e5..a244f86 100644 --- a/lib/OpenPayU/HttpCurl.php +++ b/lib/OpenPayU/HttpCurl.php @@ -61,7 +61,10 @@ public static function doPayuRequest($requestType, $pathUrl, $auth, $data = null if($response === false) { throw new OpenPayU_Exception_Network(curl_error($ch)); } - curl_close($ch); + + if (PHP_VERSION_ID < 80000) { + curl_close($ch); + } return array('code' => $httpStatus, 'response' => trim($response)); }