From 721e34619f79585cdad92174373edcf2b049931f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 1 Jun 2018 18:07:34 +0300 Subject: [ci skip] Close #5482 --- user_guide_src/source/helpers/inflector_helper.rst | 17 ++++++++++------- user_guide_src/source/installation/upgrade_320.rst | 11 +++++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/helpers/inflector_helper.rst b/user_guide_src/source/helpers/inflector_helper.rst index 76cce6f4d..ca781d2ad 100644 --- a/user_guide_src/source/helpers/inflector_helper.rst +++ b/user_guide_src/source/helpers/inflector_helper.rst @@ -85,7 +85,7 @@ The following functions are available: echo humanize('my-dog-spot', '-'); // Prints 'My Dog Spot' -.. php:function:: is_countable($word) +.. php:function:: word_is_countable($word) :param string $word: Input string :returns: TRUE if the word is countable or FALSE if not @@ -93,17 +93,20 @@ The following functions are available: Checks if the given word has a plural version. Example:: - is_countable('equipment'); // Returns FALSE + word_is_countable('equipment'); // Returns FALSE + + .. note:: This function used to be called ``is_countable()`` in + in previous CodeIgniter versions. .. php:function:: ordinal_format($number) :param int $number: non-negative natural number to be converted - :returns: Ordinal numeral for given number or original value on failure - :rtype: string + :returns: Ordinal numeral for given number or original value on failure + :rtype: string - Returns the ordinal numeral (1st, 2nd, 3rd etc.) for a - non-negative natural number. If the input is not a natural number - greater than 0, the function will return the original value. Examples:: + Returns the ordinal numeral (1st, 2nd, 3rd etc.) for a + non-negative natural number. If the input is not a natural number + greater than 0, the function will return the original value. Examples:: echo ordinal_format(1); // Returns 1st echo ordinal_format(3); // Returns 3rd diff --git a/user_guide_src/source/installation/upgrade_320.rst b/user_guide_src/source/installation/upgrade_320.rst index 3eadd8caf..a9dc274c7 100644 --- a/user_guide_src/source/installation/upgrade_320.rst +++ b/user_guide_src/source/installation/upgrade_320.rst @@ -257,3 +257,14 @@ so that if you're using the :doc:`Web Page Caching <../general/caching>` feature, you'll be left with some old, garbage cache files. That shouldn't be a problem, but you may want to clear them. + +Step 13: Check for calls to is_countable() +========================================== + + +PHP 7.3 introduces a native `is_countable() `_ +function, which creates a name collision with the ``is_countable()`` function +we've had in our :doc:`Inflector Helpers <../helpers/inflector_helper>`. + +If you've been using the helper function in question, you should now rename +the calls to it to :php:func:`word_is_countable()`. -- cgit v1.2.3-24-g4f1b