From 8a29b42df9bc21d6b65d7d8490ec585abfbf18e6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 6 Jun 2019 10:03:25 +0200 Subject: [PATCH] fixed end of constructor node logic --- src/NodeVisitor/SandboxNodeVisitor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NodeVisitor/SandboxNodeVisitor.php b/src/NodeVisitor/SandboxNodeVisitor.php index c1d302a89..c9403398f 100644 --- a/src/NodeVisitor/SandboxNodeVisitor.php +++ b/src/NodeVisitor/SandboxNodeVisitor.php @@ -102,7 +102,7 @@ class SandboxNodeVisitor extends AbstractNodeVisitor if ($node instanceof ModuleNode) { $this->inAModule = false; - $node->setNode('constructor_end', new Node([new CheckSecurityNode($this->filters, $this->tags, $this->functions), $node->getNode('display_start')])); + $node->getNode('constructor_end')->setNode('_security_check', new Node([new CheckSecurityNode($this->filters, $this->tags, $this->functions), $node->getNode('display_start')])); } elseif ($this->inAModule) { if ($node instanceof PrintNode || $node instanceof SetNode) { $this->needsToStringWrap = false;