소스 검색

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

Jeremy Mikola 14 년 전
부모
커밋
8525ff83cd
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Symfony/Component/Routing/Loader/XmlFileLoader.php

+ 1 - 1
src/Symfony/Component/Routing/Loader/XmlFileLoader.php

@@ -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));