Browse Source

fix for paths like/begin with './'

Mirco Babini 12 năm trước cách đây
mục cha
commit
08f5746c10
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/Mustache/Autoloader.php

+ 1 - 1
src/Mustache/Autoloader.php

@@ -61,7 +61,7 @@ class Mustache_Autoloader
             return;
         }
 
-        $file = sprintf('%s/%s.php', $this->baseDir, str_replace('_', '/', $class));
+        $file = sprintf('%s/%s.php', realpath($this->baseDir), str_replace('_', '/', $class));
         if (is_file($file)) {
             require $file;
         }