8000 bug #54102 [HttpClient] Fix deprecation on PHP 8.3 (nicolas-grekas) · symfony/symfony@bb7c711 · GitHub
[go: up one dir, main page]

Skip to content

Commit bb7c711

Browse files
committed
bug #54102 [HttpClient] Fix deprecation on PHP 8.3 (nicolas-grekas)
This PR was merged into the 5.4 branch. Discussion ---------- [HttpClient] Fix deprecation on PHP 8.3 | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT Commits ------- 9407a1b [HttpClient] Fix deprecation on PHP 8.3
2 parents ac07f3e + 9407a1b commit bb7c711

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Component/HttpClient/NativeHttpClient.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,11 @@ private static function createRedirectResolver(array $options, string $host, ?ar
406406
$redirectHeaders['no_auth'] = array_filter($redirectHeaders['no_auth'], $filterContentHeaders);
407407
$redirectHeaders['with_auth'] = array_filter($redirectHeaders['with_auth'], $filterContentHeaders);
408408

409-
stream_context_set_option($context, ['http' => $options]);
409+
if (\PHP_VERSION_ID >= 80300) {
410+
stream_context_set_options($context, ['http' => $options]);
411+
} else {
412+
stream_context_set_option($context, ['http' => $options]);
413+
}
410414
}
411415
}
412416

0 commit comments

Comments
 (0)
0