Эх сурвалжийг харах

fix pull 6740

wrongly copied the check, either must be in not-empty
croensch 7 жил өмнө
parent
commit
bd6168ef85

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