Skip to content

Commit

Permalink
Ignore non-scalar count argument for Translator::translate()
Browse files Browse the repository at this point in the history
  • Loading branch information
fprochazka committed Nov 1, 2013
1 parent 4ab9918 commit ec3e0c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Kdyby/Translation/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function translate($message, $count = NULL, array $parameters = array(),
}
$parameters = $tmp;

if ($count !== NULL) {
if ($count !== NULL && is_scalar($count)) {
return $this->transChoice($message, $count, $parameters + array('%count%' => $count), $domain, $locale);
}

Expand Down

0 comments on commit ec3e0c1

Please sign in to comment.