소스 검색

[WebBundle] fixed renderDir to not call renderFile on not files

Bulat (Hacker) Shakirzyanov 15 년 전
부모
커밋
6d691052ac
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      src/Symfony/Framework/WebBundle/Util/Mustache.php

+ 5 - 0
src/Symfony/Framework/WebBundle/Util/Mustache.php

@@ -34,6 +34,11 @@ class Mustache
   {
     foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir), \RecursiveIteratorIterator::LEAVES_ONLY) as $file)
     {
+      if ($file->isDot())
+      {
+        continue;
+      }
+
       static::renderFile((string) $file, $parameters);
     }
   }