Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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...
commit 634131bc77f8ccf5038abcf2e69be3576c20383b 1 parent e3a14c8
Fabien Potencier fabpot authored
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
View
@@ -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) {
$view->setRendered();
Please sign in to comment.
Something went wrong with that request. Please try again.