Skip to content

Commit 63d93fd

Browse files
[HttpClient] Fix deprecation on PHP 8.3
1 parent 3e147c3 commit 63d93fd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

NativeHttpClient.php

+5-1
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)