From 6344bf535e983904234bed156327b002822671bf Mon Sep 17 00:00:00 2001 From: fabien Date: Wed, 13 Jan 2010 14:43:33 +0000 Subject: [PATCH] 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 --- lib/Twig/Loader/Filesystem.php | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) 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)) { -- 1.7.2.5