Skip to content

Commit ba9eb44

Browse files
ymorocuttiYoann MOROCUTTI
andauthored
fix: Fix an issue when sending an HTTP code not defined in the RFC (like 420) is throwing an error (#59)
[symfony6-4] Co-authored-by: Yoann MOROCUTTI <Yoann.MOROCUTTI@boursorama.fr>
1 parent 0f94974 commit ba9eb44

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Twig/Extension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ protected function fetchInfosFromCodeOrResponse(int|array $codeOrResponse): arra
240240
$level = 'default';
241241
}
242242

243-
$statusText = $code === 'N/A' ? 'N/A' : Response::$statusTexts[$code];
243+
$statusText = $code === 'N/A' ? 'N/A' : Response::$statusTexts[$code] ?? 'N/A';
244244

245245
return [
246246
'fromCache' => $fromCache,

0 commit comments

Comments
 (0)