Skip to content

Commit

Permalink
fixed end of constructor node logic
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jun 6, 2019
1 parent f4c2b1a commit 8a29b42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NodeVisitor/SandboxNodeVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected function doLeaveNode(Node $node, Environment $env)
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;
Expand Down

0 comments on commit 8a29b42

Please sign in to comment.