curl_close deprecated in PHP 8.5

This commit is contained in:
odain
2026-06-02 17:47:10 +02:00
parent eef06ee032
commit feb89650e4
3 changed files with 9 additions and 3 deletions

View File

@@ -1922,7 +1922,9 @@ SQL;
$aResponseHeaders[$sName] = $sValue;
}
}
curl_close($ch);
if (PHP_VERSION_ID < 80000) {
curl_close($ch);
}
return $response;
}

View File

@@ -686,7 +686,9 @@ abstract class ItopTestCase extends KernelTestCase
$this->aLastCurlGetInfo = $info;
$sErrorMsg = curl_error($ch);
$iErrorCode = curl_errno($ch);
curl_close($ch);
if (PHP_VERSION_ID < 80000) {
curl_close($ch);
}
\IssueLog::Info(__METHOD__, null, ['url' => $sUrl, 'error' => $sErrorMsg, 'error_code' => $iErrorCode, 'post_fields' => $aPostFields, 'info' => $info]);

View File

@@ -39,7 +39,9 @@ class UnattendedInstallTest extends ItopDataTestCase
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$sJson = curl_exec($ch);
curl_close($ch);
if (PHP_VERSION_ID < 80000) {
curl_close($ch);
}
return $sJson;
}
public function testCallUnattendedInstallFromHttp()