From 3d97f57649ea4d95504b2e91205c8c40e2d3b817 Mon Sep 17 00:00:00 2001 From: Andrey Matsovkin Date: Tue, 4 Dec 2012 05:44:08 +0400 Subject: [PATCH] Fix #1098 cot_declension bug on float type values withou fractional part --- system/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/functions.php b/system/functions.php index a12c41ede..b23d24133 100644 --- a/system/functions.php +++ b/system/functions.php @@ -5185,7 +5185,7 @@ function cot_declension($digit, $expr, $onlyword = false, $canfrac = false) $is_frac = false; if ($canfrac) { - if (is_float($digit) || mb_strpos($digit, '.') !== false) + if ((is_float($digit) && $digit!=floor($digit)) || mb_strpos($digit, '.') !== false) { $i = floatval($digit); $is_frac = true;