Jelajahi Sumber

[TwigBundle] fixed instanceof check to include all FieldGroup like classes

Jordi Boggiano 14 tahun lalu
induk
melakukan
d94c581f42

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

@@ -96,7 +96,7 @@ class FormExtension extends \Twig_Extension
             $this->templates = $this->resolveResources($this->resources);
         }
 
-        if ($field instanceof Form || get_class($field) === 'Symfony\Component\Form\FieldGroup') {
+        if ($field instanceof FieldGroupInterface) {
             return $this->templates['group']->getBlock('group', array(
                 'group'      => $field,
                 'attributes' => $attributes,