]> git.wh0rd.org - tt-rss.git/blobdiff - lib/gettext/gettext.php
pngcrush.sh
[tt-rss.git] / lib / gettext / gettext.php
old mode 100755 (executable)
new mode 100644 (file)
index 81af555..edbd933
@@ -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);