From 34b57fac5bee095c68bcbcf540d75d1a6cdae917 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 6 Sep 2010 08:56:03 +0200 Subject: [PATCH] fixed filesystem loader should not view directory as a valid template (closes #116) --- lib/Twig/Loader/Filesystem.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/Twig/Loader/Filesystem.php b/lib/Twig/Loader/Filesystem.php index 5d77183..679c24a 100644 --- a/lib/Twig/Loader/Filesystem.php +++ b/lib/Twig/Loader/Filesystem.php @@ -107,7 +107,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface } foreach ($this->paths as $path) { - if (!file_exists($path.DIRECTORY_SEPARATOR.$name)) { + if (!file_exists($path.DIRECTORY_SEPARATOR.$name) || is_dir($path.DIRECTORY_SEPARATOR.$name)) { continue; } -- 1.7.2.5