diff --git a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php index 81bf1a6ccd07..16b9b48c2061 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -672,7 +672,7 @@ private function validateAlias(\DOMElement $alias, $file) } foreach ($alias->childNodes as $child) { - if (!$child instanceof \DOMElement && self::NS !== $child->namespaceURI) { + if (!$child instanceof \DOMElement || self::NS !== $child->namespaceURI) { continue; } if (!\in_array($child->localName, ['deprecated'], true)) {