From: Fabien Potencier Date: Thu, 28 Jul 2011 12:32:45 +0000 (+0200) Subject: fixed Parser bug when a child node is null X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=9b73026e911b11401770f00c73f5e755c4a88f75;p=web%2Fkonrad%2Ftwig.git fixed Parser bug when a child node is null --- 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); } }