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

@@ -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]);