diff options
author | George Petculescu <gxgpet@gmail.com> | 2016-10-20 20:03:38 +0200 |
---|---|---|
committer | George Petculescu <gxgpet@gmail.com> | 2016-10-20 20:03:38 +0200 |
commit | 03a1eac3b7bed8ed6df59109364a3eebe3f1cceb (patch) | |
tree | daace20d5d97648c12eab042d7224d51a963c5e1 /system/helpers | |
parent | 4fe5e99f437fe79cc40cebd08277eb319d8a6095 (diff) |
ordinal_format will accept only non-negative natural numbers and return original value on failure + docs update regarding this.
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/inflector_helper.php | 4 |
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( |