diff --git a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
index 4236b72f25..4677a61ca4 100644
--- a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
+++ b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
@@ -496,7 +496,7 @@ class XmlFileLoader extends FileLoader
switch ($arg->getAttribute('type')) {
case 'service':
- if (!$arg->getAttribute('id')) {
+ if ('' === $arg->getAttribute('id')) {
throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="service" has no or empty "id" attribute in "%s".', $name, $file));
}
if ($arg->hasAttribute('strict')) {
@@ -549,7 +549,7 @@ class XmlFileLoader extends FileLoader
* @param \DOMNode $node
* @param mixed $name
*
- * @return array
+ * @return \DOMElement[]
*/
private function getChildren(\DOMNode $node, $name)
{
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services6.xml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services6.xml
index cffd5df605..c85b7a7c01 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services6.xml
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services6.xml
@@ -61,5 +61,9 @@
+
+
+
+