Skip to content

Commit 8f11b58

Browse files
committed
Remove deprecated curl_close() for PHP 8.5 compatibility
curl_close() has been a no-op since PHP 8.0 and is deprecated since PHP 8.5. CurlHandle objects are freed automatically when they fall out of scope. Fixes #1177
1 parent 5ed828f commit 8f11b58

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

src/Core/Client/Adapter/Curl.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,13 @@ public function getResponse(\CurlHandle $handle, $httpResponse): Response
5656
if (CURLE_OK !== curl_errno($handle)) {
5757
$errno = curl_errno($handle);
5858
$error = curl_error($handle);
59-
curl_close($handle);
6059
throw new HttpException(sprintf('HTTP request failed, %s', $error), $errno);
6160
}
6261

6362
$httpCode = curl_getinfo($handle, CURLINFO_RESPONSE_CODE);
6463
$headers = [];
6564
$headers[] = 'HTTP/1.1 '.$httpCode.' OK';
6665

67-
curl_close($handle);
68-
6966
return new Response($httpResponse, $headers);
7067
}
7168

0 commit comments

Comments
 (0)