diff --git a/src/Symfony/Component/Routing/Generator/UrlGenerator.php b/src/Symfony/Component/Routing/Generator/UrlGenerator.php index 67989512cd952..6931bad09d598 100644 --- a/src/Symfony/Component/Routing/Generator/UrlGenerator.php +++ b/src/Symfony/Component/Routing/Generator/UrlGenerator.php @@ -202,16 +202,7 @@ protected function doGenerate($variables, $defaults, $requirements, $tokens, $pa $scheme = $this->context->getScheme(); if ($requiredSchemes) { - $schemeMatched = false; - foreach ($requiredSchemes as $requiredScheme) { - if ($scheme === $requiredScheme) { - $schemeMatched = true; - - break; - } - } - - if (!$schemeMatched) { + if (!in_array($scheme, $requiredSchemes, true)) { $referenceType = self::ABSOLUTE_URL; $scheme = current($requiredSchemes); } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy