From 74d2f76c23aaa6b95bf39b017696bae33bb07482 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 26 Jul 2011 17:32:54 +0200 Subject: [PATCH] fixed inherited templates when an empty body --- lib/Twig/Parser.php | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) 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()) { -- 1.7.2.5