summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorGeorge Petculescu <gxgpet@gmail.com>2016-10-20 20:03:38 +0200
committerGeorge Petculescu <gxgpet@gmail.com>2016-10-20 20:03:38 +0200
commit03a1eac3b7bed8ed6df59109364a3eebe3f1cceb (patch)
treedaace20d5d97648c12eab042d7224d51a963c5e1 /system
parent4fe5e99f437fe79cc40cebd08277eb319d8a6095 (diff)
ordinal_format will accept only non-negative natural numbers and return original value on failure + docs update regarding this.
Diffstat (limited to 'system')
-rw-r--r--system/helpers/inflector_helper.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php
index c71516564..04e178aec 100644
--- a/system/helpers/inflector_helper.php
+++ b/system/helpers/inflector_helper.php
@@ -286,9 +286,9 @@ if ( ! function_exists('ordinal_format'))
*/
function ordinal_format($number)
{
- if ( ! ctype_digit((string) $number) OR $number < 0)
+ if ( ! ctype_digit((string) $number) OR $number < 1)
{
- return FALSE;
+ return $number;
}
$last_digit = array(