From 4ade9bd96097992d3986c98199ef63e4348decc0 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 1 Feb 2021 12:55:55 +0100 Subject: [PATCH] Avoid accessing undefined indices, fixes #9654 --- src/Composer/Util/Http/ProxyManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Util/Http/ProxyManager.php b/src/Composer/Util/Http/ProxyManager.php index 693ef92ad..edd486ef3 100644 --- a/src/Composer/Util/Http/ProxyManager.php +++ b/src/Composer/Util/Http/ProxyManager.php @@ -87,7 +87,7 @@ class ProxyManager $options = array(); $formattedProxyUrl = ''; - if ($this->hasProxy && $this->fullProxy[$scheme]) { + if ($this->hasProxy && in_array($scheme, array('http', 'https'), true) && $this->fullProxy[$scheme]) { if ($this->noProxy($requestUrl)) { $formattedProxyUrl = 'excluded by no_proxy'; } else {