mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-25 06:36:26 +00:00
Remove useless assign in compiled code
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -78,7 +78,6 @@ EOF
|
||||
$node = new IncludeNode($expr, $vars, true, true, 1);
|
||||
$tests[] = [$node, <<<EOF
|
||||
// line 1
|
||||
\$__internal_%s = null;
|
||||
try {
|
||||
\$__internal_%s = \$this->loadTemplate("foo.twig", null, 1);
|
||||
} catch (LoaderError \$e) {
|
||||
|
||||
Reference in New Issue
Block a user