diff --git a/var/Typecho/Http/Client.php b/var/Typecho/Http/Client.php index 3a1083f8..3a63e921 100644 --- a/var/Typecho/Http/Client.php +++ b/var/Typecho/Http/Client.php @@ -337,13 +337,21 @@ class Client $response = curl_exec($ch); if (false === $response) { $error = curl_error($ch); - curl_close($ch); + if (PHP_VERSION_ID >= 80000) { + unset($ch); + } else { + curl_close($ch); + } throw new Exception($error, 500); } $this->responseStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE); $this->responseBody = $response; - curl_close($ch); + if (PHP_VERSION_ID >= 80000) { + unset($ch); + } else { + curl_close($ch); + } } /**