Revision 1958
Added by darkviper almost 11 years ago
Call.php | ||
---|---|---|
146 | 146 |
|
147 | 147 |
if (array_key_exists($name, $parameters)) { |
148 | 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')));
|
|
149 |
throw new Twig_Error_Syntax(sprintf('Argument "%s" is defined twice for %s "%s".', $name, $this->getAttribute('type'), $this->getAttribute('name'))); |
|
150 | 150 |
} |
151 | 151 |
|
152 | 152 |
$arguments[] = $parameters[$name]; |
... | ... | |
164 | 164 |
} |
165 | 165 |
} |
166 | 166 |
|
167 |
foreach (array_keys($parameters) as $name) {
|
|
168 |
throw new Twig_Error_Syntax(sprintf('Unknown argument "%s" for %s "%s".', $name, $this->getAttribute('type'), $this->getAttribute('name')));
|
|
167 |
if (!empty($parameters)) {
|
|
168 |
throw new Twig_Error_Syntax(sprintf('Unknown argument%s "%s" for %s "%s".', count($parameters) > 1 ? 's' : '' , implode('", "', array_keys($parameters)), $this->getAttribute('type'), $this->getAttribute('name')));
|
|
169 | 169 |
} |
170 | 170 |
|
171 | 171 |
return $arguments; |
Also available in: Unified diff
update Twig from version 1.13.1 to 1.13.2