소스 검색

[Routing] Fixing a bug where the current directory was set too late in the PhpFileLoader

Ryan Weaver 14 년 전
부모
커밋
4f0214eff4
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Symfony/Component/Routing/Loader/PhpFileLoader.php

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

@@ -35,9 +35,9 @@ class PhpFileLoader extends FileLoader
         $loader = $this;
 
         $path = $this->locator->locate($file);
+        $this->setCurrentDir(dirname($path));
 
         $collection = include $path;
-        $this->setCurrentDir(dirname($path));
         $collection->addResource(new FileResource($path));
 
         return $collection;