diff --git a/src/Symfony/Bundle/FrameworkBundle/Form/PhpEngineTheme.php b/src/Symfony/Bundle/FrameworkBundle/Form/PhpEngineTheme.php index 321b4e5670..85c0adfe77 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Form/PhpEngineTheme.php +++ b/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; diff --git a/src/Symfony/Component/Form/Renderer/Theme/FormThemeInterface.php b/src/Symfony/Component/Form/Renderer/Theme/FormThemeInterface.php index 4a94ad6e67..f933844f13 100644 --- a/src/Symfony/Component/Form/Renderer/Theme/FormThemeInterface.php +++ b/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); } diff --git a/src/Symfony/Component/Form/Renderer/Theme/PhpTheme.php b/src/Symfony/Component/Form/Renderer/Theme/PhpTheme.php index cd2340b2b5..e2596655d4 100644 --- a/src/Symfony/Component/Form/Renderer/Theme/PhpTheme.php +++ b/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; diff --git a/src/Symfony/Component/Form/Renderer/Theme/TwigTheme.php b/src/Symfony/Component/Form/Renderer/Theme/TwigTheme.php index a1eccd0395..a7b2417aa0 100644 --- a/src/Symfony/Component/Form/Renderer/Theme/TwigTheme.php +++ b/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;