Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[TwigBridge][Trans]set %count% only on transChoice

  • Loading branch information...
commit d176ffca512893d3c01246d9e8e3a6cb72b76962 1 parent 78649a8
@aitboudad aitboudad authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/Symfony/Bridge/Twig/Node/TransNode.php
View
2  src/Symfony/Bridge/Twig/Node/TransNode.php
@@ -98,7 +98,7 @@ protected function compileString(\Twig_NodeInterface $body, \Twig_Node_Expressio
foreach ($matches[1] as $var) {
$key = new \Twig_Node_Expression_Constant('%'.$var.'%', $body->getLine());
if (!$vars->hasElement($key)) {
- if ('count' === $var) {
+ if ('count' === $var && null !== $this->getNode('count')) {
$vars->addElement($this->getNode('count'), $key);
} else {
$varExpr = new \Twig_Node_Expression_Name($var, $body->getLine());
Please sign in to comment.
Something went wrong with that request. Please try again.