From ef485402e04a419cc2f6f52b5d795d750b016fa4 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 28 Jul 2011 14:32:07 +0200 Subject: [PATCH] fixed Parser bug --- lib/Twig/Parser.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/Twig/Parser.php b/lib/Twig/Parser.php index fea244e..0649c7b 100644 --- a/lib/Twig/Parser.php +++ b/lib/Twig/Parser.php @@ -310,7 +310,7 @@ class Twig_Parser implements Twig_ParserInterface } foreach ($node as $k => $n) { - if (null === $n = $this->filterBodyNodes($n)) { + if ($n instanceof Twig_NodeInterface && null === $n = $this->filterBodyNodes($n)) { $node->removeNode($k); } } -- 1.7.2.5