Skip to content

Commit 274e477

Browse files
cl77justpilot
andauthored
Remove deprecated curl_close() call (#24)
Since PHP 8.0, curl_close() has no effect as curl handles are automatically closed. Since PHP 8.5, curl_close() is deprecated. As this project requires PHP >=8.2, the curl_close() call is unnecessary and generates deprecation warnings in PHP 8.5+. Closes #22 Co-authored-by: justpilot <[email protected]>
1 parent 4c5891c commit 274e477

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/Client.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ protected function request(string $path, HttpMethod $method, array $payload = []
121121
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
122122
$isSuccess = $httpCode === 200;
123123
$error = curl_error($ch);
124-
curl_close($ch);
125124

126125
if ($error !== '') throw new UnexpectedApiResponseException($error);
127126
if (false === $res) throw new UnexpectedApiResponseException($error);

0 commit comments

Comments
 (0)