From f300fb27a54c4eb6018dffb77a5e541416ffa5c2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 26 Sep 2011 10:27:25 +0300 Subject: Use CI's is_php() instead of comparing against phpversion() --- system/libraries/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries') diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 67551fbbd..fc3de0329 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -1021,7 +1021,7 @@ class CI_Upload { protected function _file_mime_type($file) { // Use if the Fileinfo extension, if available (only versions above 5.3 support the FILEINFO_MIME_TYPE flag) - if ( (float) substr(phpversion(), 0, 3) >= 5.3 && function_exists('finfo_file')) + if (is_php('5.3') && function_exists('finfo_file')) { $finfo = new finfo(FILEINFO_MIME_TYPE); if ($finfo !== FALSE) // This is possible, if there is no magic MIME database file found on the system -- cgit v1.2.3-24-g4f1b