Skip to content

Commit

Permalink
dev/translation#36 Ensure that we are only passing integers to the ng…
Browse files Browse the repository at this point in the history
…ettext function for plurals
  • Loading branch information
seamuslee001 committed Feb 20, 2020
1 parent d1bcf80 commit 26ff2e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Core/I18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ protected function crm_translate_raw($text, $domain, $count, $plural, $context)
if (isset($count) && isset($plural)) {

if ($this->_phpgettext) {
$text = $this->_phpgettext->ngettext($text, $plural, $count);
$text = $this->_phpgettext->ngettext($text, $plural, (int) $count);
}
else {
// if the locale's not set, we do ngettext work by hand
Expand Down

0 comments on commit 26ff2e2

Please sign in to comment.