Explorar o código

fix pull 6740

wrongly copied the check, either must be in not-empty
croensch %!s(int64=7) %!d(string=hai) anos
pai
achega
bd6168ef85
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Composer/Util/StreamContextFactory.php

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