fixed Parser bug

This commit is contained in:
Fabien Potencier
2011-07-28 14:32:07 +02:00
parent c7be5242c4
commit ef485402e0
+1 -1
View File
@@ -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);
}
}