1
0
Fork 0

fix pull 6740

wrongly copied the check, either must be in not-empty
pull/6740/head
croensch 2017-10-13 09:49:04 +02:00 committed by GitHub
parent 6da92e98ac
commit bd6168ef85
1 changed files with 1 additions and 1 deletions

View File

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