Bläddra i källkod

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

Ryan Weaver 14 år sedan
förälder
incheckning
4f0214eff4
1 ändrade filer med 1 tillägg och 1 borttagningar
  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;