From 26ff2e246009bf30fcedf2e3ea368df4df3d072f Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Thu, 20 Feb 2020 12:53:07 +1100 Subject: [PATCH] dev/translation#36 Ensure that we are only passing integers to the ngettext function for plurals --- CRM/Core/I18n.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Core/I18n.php b/CRM/Core/I18n.php index fe4e46110c..1da5d28005 100644 --- a/CRM/Core/I18n.php +++ b/CRM/Core/I18n.php @@ -448,7 +448,7 @@ class CRM_Core_I18n { 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 -- 2.25.1