Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/Http/CurlDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ public static function fetch(array $settings, ResponseFactoryInterface $response
curl_multi_remove_handle($multi, $curlHandle);
}

curl_multi_close($multi);
if (PHP_VERSION_ID < 80000) {
curl_multi_close($multi);
}

return array_map(
fn ($connection) => $connection->getResponse($responseFactory),
Expand Down Expand Up @@ -160,8 +162,10 @@ private function getResponse(ResponseFactoryInterface $responseFactory): Respons
$this->error(curl_error($curlHandle), $errno);
}

/** @phpstan-ignore argument.type (PHP 7.4/8.0 compatibility) */
curl_close($curlHandle);
if (PHP_VERSION_ID < 80000) {
/** @phpstan-ignore argument.type (PHP 7.4/8.0 compatibility) */
curl_close($curlHandle);
}

$response = $responseFactory->createResponse($info['http_code']);

Expand Down