소스 검색

[TwigBundle] fixed theme for forms

Fabien Potencier 14 년 전
부모
커밋
67c9fdf412
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/Symfony/Bundle/TwigBundle/Extension/FormExtension.php

+ 2 - 2
src/Symfony/Bundle/TwigBundle/Extension/FormExtension.php

@@ -246,11 +246,11 @@ class FormExtension extends \Twig_Extension
 
         // themes
         $parent = $field;
-        while ($parent = $parent->getParent()) {
+        do {
             if (isset($this->themes[$parent])) {
                 $all = array_merge($all, $this->themes[$parent]);
             }
-        }
+        } while ($parent = $parent->getParent());
 
         // local
         $all = array_merge($all, null !== $resources ? (array) $resources : array());