[Routing] XmlFileLoader should treat a missing "type" attribute as null when calling FileLoader::import()

This commit is contained in:
Jeremy Mikola 2011-02-11 11:48:14 -05:00 committed by Fabien Potencier
parent 36ff9abe67
commit 8525ff83cd
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ class XmlFileLoader extends FileLoader
$type = (string) $node->getAttribute('type');
$prefix = (string) $node->getAttribute('prefix');
$this->currentDir = dirname($path);
$collection->addCollection($this->import($resource, $type), $prefix);
$collection->addCollection($this->import($resource, ('' !== $type ? $type : null)), $prefix);
break;
default:
throw new \InvalidArgumentException(sprintf('Unable to parse tag "%s"', $node->tagName));