From: Fabien Potencier Date: Tue, 26 Jul 2011 15:32:54 +0000 (+0200) Subject: fixed inherited templates when an empty body X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=74d2f76c23aaa6b95bf39b017696bae33bb07482;p=web%2Fkonrad%2Ftwig.git fixed inherited templates when an empty body --- diff --git a/lib/Twig/Parser.php b/lib/Twig/Parser.php index fc41374..fea244e 100644 --- a/lib/Twig/Parser.php +++ b/lib/Twig/Parser.php @@ -81,7 +81,9 @@ class Twig_Parser implements Twig_ParserInterface $body = $this->subparse(null); if (null !== $this->parent) { - $body = $this->filterBodyNodes($body); + if (null === $body = $this->filterBodyNodes($body)) { + $body = new Twig_Node(); + } } } catch (Twig_Error_Syntax $e) { if (null === $e->getTemplateFile()) {