From c700c74652277a5c78f738956f1a3fb1ee773195 Mon Sep 17 00:00:00 2001 From: Pieter Hoste Date: Mon, 8 Jun 2026 08:21:16 +0200 Subject: [PATCH] Only call 'curl_close' when PHP's version is lower then 8.0, this fixes a deprecation warning on PHP 8.5 --- src/Common/HttpClient.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Common/HttpClient.php b/src/Common/HttpClient.php index 9828584..527bfba 100644 --- a/src/Common/HttpClient.php +++ b/src/Common/HttpClient.php @@ -248,7 +248,10 @@ public function sendRequest($method, $resourceName, $query = null, $headers = [] } $responseStatus = (int)curl_getinfo($curl, CURLINFO_HTTP_CODE); - curl_close($curl); + + if (PHP_VERSION_ID < 80000) { + curl_close($curl); + } // Split the header and body $parts = explode("\r\n\r\n", $response, 3);