minor #30927 [HttpClient] Removed undefined variable (derrabus)

This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient] Removed undefined variable

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

The variable `$noProxy` is accessed here before it is defined.

`EU-FOSSA`

Commits
-------

69f0a0b3bf Removed undefined variable.
This commit is contained in:
Fabien Potencier 2019-04-06 20:45:16 +02:00
commit 58d78ac2cd

View File

@ -201,7 +201,7 @@ final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterfac
];
$proxy = self::getProxy($options['proxy'], $url);
$noProxy = $noProxy ?? $_SERVER['no_proxy'] ?? $_SERVER['NO_PROXY'] ?? '';
$noProxy = $_SERVER['no_proxy'] ?? $_SERVER['NO_PROXY'] ?? '';
$noProxy = $noProxy ? preg_split('/[\s,]+/', $noProxy) : [];
$resolveRedirect = self::createRedirectResolver($options, $host, $proxy, $noProxy, $info, $onProgress);