Revision 1938
Added by darkviper almost 11 years ago
Call.php | ||
---|---|---|
98 | 98 |
if (!is_int($name)) { |
99 | 99 |
$named = true; |
100 | 100 |
$name = $this->normalizeName($name); |
101 |
} elseif ($named) { |
|
102 |
throw new Twig_Error_Syntax(sprintf('Positional arguments cannot be used after named arguments for %s "%s".', $this->getAttribute('type'), $this->getAttribute('name'))); |
|
101 | 103 |
} |
104 |
|
|
102 | 105 |
$parameters[$name] = $node; |
103 | 106 |
} |
104 | 107 |
|
... | ... | |
142 | 145 |
$name = $this->normalizeName($param->name); |
143 | 146 |
|
144 | 147 |
if (array_key_exists($name, $parameters)) { |
148 |
if (array_key_exists($pos, $parameters)) { |
|
149 |
throw new Twig_Error_Syntax(sprintf('Arguments "%s" is defined twice for %s "%s".', $name, $this->getAttribute('type'), $this->getAttribute('name'))); |
|
150 |
} |
|
151 |
|
|
145 | 152 |
$arguments[] = $parameters[$name]; |
146 | 153 |
unset($parameters[$name]); |
147 | 154 |
} elseif (array_key_exists($pos, $parameters)) { |
Also available in: Unified diff
update Twig template engine to version 1.13.1