Browse Source

[Form] Fixed signature of FormThemeInterface::render()

Bernhard Schussek 14 years ago
parent
commit
67d85c6bc7

+ 3 - 1
src/Symfony/Bundle/FrameworkBundle/Form/PhpEngineTheme.php

@@ -48,8 +48,10 @@ class PhpEngineTheme implements FormThemeInterface
         $this->templateDir = $templateDir;
     }
 
-    public function render(array $blocks, $section, array $parameters)
+    public function render($blocks, $section, array $parameters)
     {
+        $blocks = (array)$blocks;
+
         foreach ($blocks as &$block) {
             $block = $block.'_'.$section;
 

+ 1 - 1
src/Symfony/Component/Form/Renderer/Theme/FormThemeInterface.php

@@ -13,5 +13,5 @@ namespace Symfony\Component\Form\Renderer\Theme;
 
 interface FormThemeInterface
 {
-    function render(array $blocks, $section, array $parameters);
+    function render($blocks, $section, array $parameters);
 }

+ 3 - 1
src/Symfony/Component/Form/Renderer/Theme/PhpTheme.php

@@ -33,8 +33,10 @@ class PhpTheme implements FormThemeInterface
         $this->charset = $charset;
     }
 
-    public function render(array $blocks, $section, array $parameters)
+    public function render($blocks, $section, array $parameters)
     {
+        $blocks = (array)$blocks;
+
         foreach ($blocks as $block) {
             $method = $block.'_'.$section;
 

+ 3 - 1
src/Symfony/Component/Form/Renderer/Theme/TwigTheme.php

@@ -73,10 +73,12 @@ class TwigTheme implements FormThemeInterface
         return array_unique($names);
     }
 
-    public function render(array $blocks, $section, array $parameters)
+    public function render($blocks, $section, array $parameters)
     {
         $this->initialize();
 
+        $blocks = (array)$blocks;
+
         foreach ($blocks as $block) {
             $blockName = $block.'__'.$section;