diff --git a/NativeHttpClient.php b/NativeHttpClient.php index 68f1fc2..db5cee6 100644 --- a/NativeHttpClient.php +++ b/NativeHttpClient.php @@ -404,7 +404,11 @@ private static function createRedirectResolver(array $options, string $host, str $redirectHeaders['no_auth'] = array_filter($redirectHeaders['no_auth'], $filterContentHeaders); $redirectHeaders['with_auth'] = array_filter($redirectHeaders['with_auth'], $filterContentHeaders); - stream_context_set_option($context, ['http' => $options]); + if (\PHP_VERSION_ID >= 80300) { + stream_context_set_options($context, ['http' => $options]); + } else { + stream_context_set_option($context, ['http' => $options]); + } } }