From: fabien Date: Wed, 13 Jan 2010 14:43:33 +0000 (+0000) Subject: change usage of realpath because of some bug with PHP 5.2.4 X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=6344bf535e983904234bed156327b002822671bf;p=konrad%2Ftwig.git change usage of realpath because of some bug with PHP 5.2.4 git-svn-id: http://svn.twig-project.org/trunk@225 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- diff --git a/lib/Twig/Loader/Filesystem.php b/lib/Twig/Loader/Filesystem.php index 8a35ad1..c5face2 100644 --- a/lib/Twig/Loader/Filesystem.php +++ b/lib/Twig/Loader/Filesystem.php @@ -112,11 +112,13 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface foreach ($this->paths as $path) { - if (false === $file = realpath($path.DIRECTORY_SEPARATOR.$name)) + if (!file_exists($path.DIRECTORY_SEPARATOR.$name)) { continue; } + $file = realpath($path.DIRECTORY_SEPARATOR.$name); + // simple security check if (0 !== strpos($file, $path)) {