diff options
author | vlakoff <vlakoff@gmail.com> | 2014-04-05 09:52:01 +0200 |
---|---|---|
committer | vlakoff <vlakoff@gmail.com> | 2014-04-05 13:21:47 +0200 |
commit | 629d37532acaf3d6e57d25545e16ecc24459c59c (patch) | |
tree | df5c8a3ed9607485bedada0311e34c711a741f6a | |
parent | 8e814ee16f2569619627d2c3e22433d7391f011c (diff) |
Remove default parameter value of is_php()
It was simply pointless.
-rw-r--r-- | system/core/Common.php | 4 | ||||
-rw-r--r-- | user_guide_src/source/changelog.rst | 1 | ||||
-rw-r--r-- | user_guide_src/source/general/common_functions.rst | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/system/core/Common.php b/system/core/Common.php index 237bd4246..fda747b05 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -51,14 +51,14 @@ if ( ! function_exists('is_php')) * @param string * @return bool TRUE if the current version is $version or higher */ - function is_php($version = '5.3.0') + function is_php($version) { static $_is_php; $version = (string) $version; if ( ! isset($_is_php[$version])) { - $_is_php[$version] = (version_compare(PHP_VERSION, $version) >= 0); + $_is_php[$version] = version_compare(PHP_VERSION, $version, '>='); } return $_is_php[$version]; diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 9795c3b9d..9d3ceb08e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -480,6 +480,7 @@ Release Date: Not Released - Added function :func:`function_usable()` to work around a bug in `Suhosin <http://www.hardened-php.net/suhosin/>`. - Removed the third (`$php_error`) argument from function :func:`log_message()`. - Changed internal function ``load_class()`` to accept a constructor parameter instead of (previously unused) class name prefix. + - Removed default parameter value of :func:`is_php()`. - :doc:`Output Library <libraries/output>` changes include: diff --git a/user_guide_src/source/general/common_functions.rst b/user_guide_src/source/general/common_functions.rst index 2ca7478ec..9c0a7cbe1 100644 --- a/user_guide_src/source/general/common_functions.rst +++ b/user_guide_src/source/general/common_functions.rst @@ -13,13 +13,13 @@ loading any libraries or helpers. <div class="custom-index container"></div> -.. function:: is_php([$version = '5.3.0']) +.. function:: is_php($version) :param string $version: Version number :returns: TRUE if the running PHP version is at least the one specified or FALSE if not :rtype: bool - Determines of the PHP version being used is greater than the + Determines if the PHP version being used is greater than the supplied version number. Example:: |