Created
January 21, 2011 09:42
-
-
Save rande/789474 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Symfony/Bundle/FrameworkBundle/Routing/FileLocator.php b/src/Symfony/Bundle/FrameworkBundle/Routing/FileLocator | |
index 49b69f2..698e17d 100644 | |
--- a/src/Symfony/Bundle/FrameworkBundle/Routing/FileLocator.php | |
+++ b/src/Symfony/Bundle/FrameworkBundle/Routing/FileLocator.php | |
@@ -42,7 +42,8 @@ class FileLocator extends BaseFileLocator | |
public function locate($file) | |
{ | |
if ('@' === $file[0]) { | |
- return $this->kernel->locateResource($file); | |
+ $ressources = $this->kernel->locateResource($file, null, false); | |
+ return $ressources[0]; | |
} | |
return parent::locate($file); | |
diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateLocator.php b/src/Symfony/Bundle/FrameworkBundle/Templ | |
index 5daa426..e3177ca 100644 | |
--- a/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateLocator.php | |
+++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateLocator.php | |
@@ -65,7 +65,9 @@ class TemplateLocator | |
} | |
try { | |
- return $this->kernel->locateResource('@'.$resource, $this->path); | |
+ $ressources = $this->kernel->locateResource('@'.$resource, $this->path, false); | |
+ | |
+ return $ressources[0]; | |
} catch (\Exception $e) { | |
throw new \InvalidArgumentException(sprintf('Unable to find template "%s".', $name, $this->path), 0, $e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment