From 021c4c3456db192c6457f5dce83e40c1c011b6d6 Mon Sep 17 00:00:00 2001 From: Alex Stojka Date: Wed, 6 May 2026 14:14:35 +0300 Subject: [PATCH] Remove deprecated curl_close() call for PHP 8.5 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since PHP 8.0, curl handles are CurlHandle objects destroyed automatically by the garbage collector, making curl_close() a no-op. In PHP 8.5 it was officially deprecated and triggers a deprecation notice. Removing this call has no functional impact on PHP 7.x — the handle is freed when the $client object goes out of scope. --- restclient.php | 1 - 1 file changed, 1 deletion(-) diff --git a/restclient.php b/restclient.php index f15d1bf..271c99e 100755 --- a/restclient.php +++ b/restclient.php @@ -208,7 +208,6 @@ public function execute(string $url, string $method='GET', $parameters=[], array $client->info = (object) curl_getinfo($client->handle); $client->error = curl_error($client->handle); - curl_close($client->handle); return $client; }