Skip to content

Commit

Permalink
[TwigBridge] fixed fixed scope & trans_default_domain node visitor
Browse files Browse the repository at this point in the history
  • Loading branch information
jfsimon committed Mar 12, 2013
1 parent c5e999a commit fe4cc24
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions src/Symfony/Bridge/Twig/NodeVisitor/Scope.php
Expand Up @@ -34,6 +34,7 @@ public function __construct(Scope $parent = null)
{
$this->parent = $parent;
$this->left = false;
$this->data = array();
}

/**
Expand Down
Expand Up @@ -43,10 +43,6 @@ public function enterNode(\Twig_NodeInterface $node, \Twig_Environment $env)
$this->scope = $this->scope->enter();
}

if ($node instanceof \Twig_Node_Module) {
$this->scope->set('domain', null);
}

if ($node instanceof TransDefaultDomainNode) {
if ($node->getNode('expr') instanceof \Twig_Node_Expression_Constant) {
$this->scope->set('domain', $node->getNode('expr'));
Expand Down

0 comments on commit fe4cc24

Please sign in to comment.