fix: 移除 HttpClient 中的 curl_close() 调用
PHP 8.0+ 中 curl 资源会自动关闭,curl_close() 已被弃用。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -47,7 +47,7 @@ class HttpClient
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
$error = curl_error($ch);
|
||||
|
||||
curl_close($ch);
|
||||
// PHP 8.0+ curl 资源自动关闭,无需 curl_close()
|
||||
|
||||
self::logRequest('GET', $url, [], $response, $httpCode);
|
||||
|
||||
@@ -103,7 +103,7 @@ class HttpClient
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
$error = curl_error($ch);
|
||||
|
||||
curl_close($ch);
|
||||
// PHP 8.0+ curl 资源自动关闭,无需 curl_close()
|
||||
|
||||
self::logRequest('POST', $url, $data, $response, $httpCode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user