diff --git a/src/Node/IncludeNode.php b/src/Node/IncludeNode.php index 33267170d..5e0c6deb0 100644 --- a/src/Node/IncludeNode.php +++ b/src/Node/IncludeNode.php @@ -42,7 +42,6 @@ class IncludeNode extends Node implements NodeOutputInterface $template = $compiler->getVarName(); $compiler - ->write(\sprintf("$%s = null;\n", $template)) ->write("try {\n") ->indent() ->write(\sprintf('$%s = ', $template)) diff --git a/tests/Node/IncludeTest.php b/tests/Node/IncludeTest.php index e0c23cd61..45bebaf21 100644 --- a/tests/Node/IncludeTest.php +++ b/tests/Node/IncludeTest.php @@ -78,7 +78,6 @@ EOF $node = new IncludeNode($expr, $vars, true, true, 1); $tests[] = [$node, <<loadTemplate("foo.twig", null, 1); } catch (LoaderError \$e) {