From 10f16e4f322420ce53a947cc25be8a44114da77e Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Thu, 28 Jan 2016 14:40:47 +0100 Subject: [PATCH] php-gettext extlib updated as req !88 Thanks postblue --- extlib/php-gettext/gettext.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extlib/php-gettext/gettext.php b/extlib/php-gettext/gettext.php index 5064047cbd..171d14e23d 100644 --- a/extlib/php-gettext/gettext.php +++ b/extlib/php-gettext/gettext.php @@ -350,6 +350,10 @@ class gettext_reader { * @return int array index of the right plural form */ function select_string($n) { + if (!is_int($n)) { + throw new InvalidArgumentException( + "Select_string only accepts integers: " . $n); + } $string = $this->get_plural_forms(); $string = str_replace('nplurals',"\$total",$string); $string = str_replace("n",$n,$string); -- 2.39.5