fixed end of constructor node logic

This commit is contained in:
Fabien Potencier
2019-06-06 10:03:25 +02:00
parent f4c2b1a885
commit 8a29b42df9
+1 -1
View File
@@ -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;