From 77b513b821bf6df4b3afd4b841db93999632050e Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Thu, 6 Aug 2009 14:39:25 +0000 Subject: fixed a bug in r1718 where the PHP version key was cast as float in a particular test, making the array keys used by is_php() inaccurate beyond whole number versions http://codeigniter.com/bug_tracker/bug/8475/ --- system/codeigniter/Common.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'system/codeigniter/Common.php') diff --git a/system/codeigniter/Common.php b/system/codeigniter/Common.php index 1ffed6a0c..6d3202d1b 100644 --- a/system/codeigniter/Common.php +++ b/system/codeigniter/Common.php @@ -36,12 +36,14 @@ * we'll set a static variable. * * @access public -* @return bool +* @param string +* * @return bool */ function is_php($version = '5.0.0') { static $_is_php; - + $version = (string)$version; + if ( ! isset($_is_php[$version])) { $_is_php[$version] = (version_compare(PHP_VERSION, $version) < 0) ? FALSE : TRUE; -- cgit v1.2.3-24-g4f1b