change usage of realpath because of some bug with PHP 5.2.4
authorfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Wed, 13 Jan 2010 14:43:33 +0000 (14:43 +0000)
committerfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Wed, 13 Jan 2010 14:43:33 +0000 (14:43 +0000)
git-svn-id: http://svn.twig-project.org/trunk@225 93ef8e89-cb99-4229-a87c-7fa0fa45744b

lib/Twig/Loader/Filesystem.php

index 8a35ad1..c5face2 100644 (file)
@@ -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))
       {