From 9b73026e911b11401770f00c73f5e755c4a88f75 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 28 Jul 2011 14:32:45 +0200 Subject: [PATCH] fixed Parser bug when a child node is null --- 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 0649c7b..057c1e8 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 ($n instanceof Twig_NodeInterface && null === $n = $this->filterBodyNodes($n)) { + if (null !== $n && null === $n = $this->filterBodyNodes($n)) { $node->removeNode($k); } } -- 1.7.2.5