Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

[Twig] made a small optimization to avoid problems with XDebug when r…

…endering forms with deep nested collections
  • Loading branch information...
1 parent e3a14c8 commit 634131bc77f8ccf5038abcf2e69be3576c20383b @fabpot fabpot committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/Symfony/Bridge/Twig/Extension/FormExtension.php
5 src/Symfony/Bridge/Twig/Extension/FormExtension.php
@@ -248,7 +248,10 @@ protected function render(FormView $view, $section, array $variables = array())
$this->varStack[$rendering]['typeIndex'] = $typeIndex;
- $html = $this->template->renderBlock($types[$typeIndex], $this->varStack[$rendering]['variables'], $blocks);
+ // we do not call renderBlock here to avoid too many nested level calls (XDebug limits the level to 100 by default)
+ ob_start();
+ $this->template->displayBlock($types[$typeIndex], $this->varStack[$rendering]['variables'], $blocks);
+ $html = ob_get_clean();
if ($mainTemplate) {

0 comments on commit 634131b

Please sign in to comment.
Something went wrong with that request. Please try again.