Explorar el Código

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

Jordi Boggiano hace 14 años
padre
commit
d94c581f42
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/Symfony/Bundle/TwigBundle/Extension/FormExtension.php

+ 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,