From dd99675f7223b0fb659e4146544969e2aa978fa9 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 30 Nov 2011 21:07:53 +0100 Subject: [PATCH] [ticket/10345] Document behaviour for floating numbers on phpbb_get_plural_form The numbers are floored by casting to int. PHPBB3-10345 --- phpBB/includes/functions.php | 2 +- phpBB/includes/session.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 762676309c..901caa6f09 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4186,7 +4186,7 @@ function phpbb_optionset($bit, $set, $data) * For some languages this is not as simple as for English. * * @param $rule int ID of the plural rule we want to use, see http://wiki.phpbb.com/Plural_Rules#Plural_Rules -* @param $number int|float The number we want to get the plural case for +* @param $number int|float The number we want to get the plural case for. Float numbers are floored. * @return int The plural-case we need to use for the number plural-rule combination */ function phpbb_get_plural_form($rule, $number) diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index eb84cd81fe..808d1a4a7f 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -1914,7 +1914,7 @@ class user extends session * Determine which plural form we should use. * For some languages this is not as simple as for English. * - * @param $number int|float The number we want to get the plural case for + * @param $number int|float The number we want to get the plural case for. Float numbers are floored. * @param $force_rule mixed False to use the plural rule of the language package * or an integer to force a certain plural rule * @return int The plural-case we need to use for the number plural-rule combination