fixed compat with NodeInterface

This commit is contained in:
Fabien Potencier
2019-04-12 12:20:42 +02:00
parent 243024d4e8
commit 701d8af675
+1 -1
View File
@@ -236,7 +236,7 @@ class Node implements \Twig_NodeInterface
{
$this->sourceContext = $source;
foreach ($this->nodes as $node) {
if (null !== $node) {
if ($node instanceof Node) {
$node->setSourceContext($source);
}
}