From 20aae67e7c338c843a1c4d02b6fa3eda3fdb8b1b Mon Sep 17 00:00:00 2001 From: Jamie Burchell Date: Thu, 23 Oct 2025 09:39:59 +0100 Subject: [PATCH] Only call curl_close() for PHP < 8 --- class/transport.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/class/transport.php b/class/transport.php index 067aee2..b7121a3 100644 --- a/class/transport.php +++ b/class/transport.php @@ -187,8 +187,10 @@ function make_call($call_options) { 'response' => $result ); - curl_close($ch); - + if (PHP_MAJOR_VERSION < 8) { + curl_close($ch); + } + return $result; } } @@ -349,4 +351,4 @@ function _build_request($call_options, $host, $path, $accept_gzip) { return $request."\n\n"; } } -} \ No newline at end of file +}