Browse code

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

fabien authored on 13/01/2010 14:43:33
Showing 1 changed files
... ...
@@ -112,11 +112,13 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface
112 112
 
113 113
     foreach ($this->paths as $path)
114 114
     {
115
-      if (false === $file = realpath($path.DIRECTORY_SEPARATOR.$name))
115
+      if (!file_exists($path.DIRECTORY_SEPARATOR.$name))
116 116
       {
117 117
         continue;
118 118
       }
119 119
 
120
+      $file = realpath($path.DIRECTORY_SEPARATOR.$name);
121
+
120 122
       // simple security check
121 123
       if (0 !== strpos($file, $path))
122 124
       {