From: Fabien Potencier Date: Mon, 6 Sep 2010 06:56:03 +0000 (+0200) Subject: fixed filesystem loader should not view directory as a valid template (closes #116) X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=34b57fac5bee095c68bcbcf540d75d1a6cdae917;p=web%2Fkonrad%2Ftwig.git fixed filesystem loader should not view directory as a valid template (closes #116) --- 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; }