From a1b395b147bb00951484eaa683a64dad79e52e4f Mon Sep 17 00:00:00 2001 From: root Date: Thu, 26 Feb 2026 10:45:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=20HttpClient=20?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=20curl=5Fclose()=20=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PHP 8.0+ 中 curl 资源会自动关闭,curl_close() 已被弃用。 Co-Authored-By: Claude Opus 4.6 --- backend/app/util/HttpClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/util/HttpClient.php b/backend/app/util/HttpClient.php index 97ed271..1454408 100644 --- a/backend/app/util/HttpClient.php +++ b/backend/app/util/HttpClient.php @@ -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);