diff --git a/lib/WebDriver/Service/CurlService.php b/lib/WebDriver/Service/CurlService.php index 1462fb5..10e0c8c 100755 --- a/lib/WebDriver/Service/CurlService.php +++ b/lib/WebDriver/Service/CurlService.php @@ -89,7 +89,9 @@ public function execute($requestMethod, $url, $parameters = null, $extraOptions CURLE_GOT_NOTHING !== ($errno = curl_errno($curl)) && $error = curl_error($curl) ) { - curl_close($curl); + if (\PHP_VERSION_ID < 80000) { + curl_close($curl); + } $e = new CurlExecException( sprintf( @@ -106,8 +108,9 @@ public function execute($requestMethod, $url, $parameters = null, $extraOptions throw $e; } - - curl_close($curl); + if (\PHP_VERSION_ID < 80000) { + curl_close($curl); + } return array($rawResult, $info); }