fix pull 6740

wrongly copied the check, either must be in not-empty
main
croensch 7 years ago committed by GitHub
parent 6da92e98ac
commit bd6168ef85

@ -55,7 +55,7 @@ final class StreamContextFactory
}
// Remove proxy if URL matches no_proxy directive
if (!empty($_SERVER['NO_PROXY']) || $_SERVER['no_proxy']) && parse_url($url, PHP_URL_HOST)) {
if (!empty($_SERVER['NO_PROXY']) || !empty($_SERVER['no_proxy']) && parse_url($url, PHP_URL_HOST)) {
$pattern = new NoProxyPattern(!empty($_SERVER['no_proxy']) ? $_SERVER['no_proxy'] : $_SERVER['NO_PROXY']);
if ($pattern->test($url)) {
unset($proxy);

Loading…
Cancel
Save