Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe4cc24

Browse files
committed
[TwigBridge] fixed fixed scope & trans_default_domain node visitor
1 parent c5e999a commit fe4cc24

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/Symfony/Bridge/Twig/NodeVisitor/Scope.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public function __construct(Scope $parent = null)
3434
{
3535
$this->parent = $parent;
3636
$this->left = false;
37+
$this->data = array();
3738
}
3839

3940
/**

src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ public function enterNode(\Twig_NodeInterface $node, \Twig_Environment $env)
4343
$this->scope = $this->scope->enter();
4444
}
4545

46-
if ($node instanceof \Twig_Node_Module) {
47-
$this->scope->set('domain', null);
48-
}
49-
5046
if ($node instanceof TransDefaultDomainNode) {
5147
if ($node->getNode('expr') instanceof \Twig_Node_Expression_Constant) {
5248
$this->scope->set('domain', $node->getNode('expr'));

0 commit comments

Comments
 (0)