summaryrefslogtreecommitdiff
path: root/inc/lib/Twig/Node/Expression/Call.php
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-11-11 21:54:35 +0100
committerczaks <marcin@6irc.net>2013-11-11 21:54:35 +0100
commitf5657caf24753ed7c25d56659ae8dfe79d48b99a (patch)
tree989f1149070194f18f6250c851159dda813151fe /inc/lib/Twig/Node/Expression/Call.php
parent0a58973631626879abeea4956b33cc2b56dea453 (diff)
parent9fb63b053fbb552a2a8bbde1e230a8b73296fb6d (diff)
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard into vichan-devel-4.5
Conflicts: inc/config.php install.php post.php stylesheets/style.css
Diffstat (limited to 'inc/lib/Twig/Node/Expression/Call.php')
-rw-r--r--inc/lib/Twig/Node/Expression/Call.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/lib/Twig/Node/Expression/Call.php b/inc/lib/Twig/Node/Expression/Call.php
index 87b62deb..dba9b0e6 100644
--- a/inc/lib/Twig/Node/Expression/Call.php
+++ b/inc/lib/Twig/Node/Expression/Call.php
@@ -146,7 +146,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression
if (array_key_exists($name, $parameters)) {
if (array_key_exists($pos, $parameters)) {
- throw new Twig_Error_Syntax(sprintf('Arguments "%s" is defined twice for %s "%s".', $name, $this->getAttribute('type'), $this->getAttribute('name')));
+ throw new Twig_Error_Syntax(sprintf('Argument "%s" is defined twice for %s "%s".', $name, $this->getAttribute('type'), $this->getAttribute('name')));
}
$arguments[] = $parameters[$name];
@@ -164,8 +164,8 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression
}
}
- foreach (array_keys($parameters) as $name) {
- throw new Twig_Error_Syntax(sprintf('Unknown argument "%s" for %s "%s".', $name, $this->getAttribute('type'), $this->getAttribute('name')));
+ if (!empty($parameters)) {
+ 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')));
}
return $arguments;