From bd6168ef85dd74b58142ad56e08e3ad2eb97208f Mon Sep 17 00:00:00 2001 From: croensch Date: Fri, 13 Oct 2017 09:49:04 +0200 Subject: [PATCH] fix pull 6740 wrongly copied the check, either must be in not-empty --- src/Composer/Util/StreamContextFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Util/StreamContextFactory.php b/src/Composer/Util/StreamContextFactory.php index e177059d3..b8290086c 100644 --- a/src/Composer/Util/StreamContextFactory.php +++ b/src/Composer/Util/StreamContextFactory.php @@ -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);