diff --git a/CHANGELOG b/CHANGELOG index ee74e22e5..29f53a070 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,19 +8,21 @@ Version 1.1.6 to be released - Bug #1790: Fixed the bug that CJSON::encode may generate invalid encoding result when data contains float numbers (Qiang) - Bug #1799: Fixed the bug that CJuiDatePicker::$name may cause a PHP error (Y!!) - Bug #1819: CHttpRequest::getPathInfo() now respects encoded characters (Sam Dark, creocoder) +- Bug #1851: CFileHelper::getMimeType() was causing an error if used with PHP 5.2 and PECL fileinfo extension (Sam Dark) - Bug #1858: Fixed the bug that CDbCommandBuilder::createInCondition() doesn't work with composite keys (Qiang) - Bug #1864: Fixed a typo in CDbCommandBuilder that disables correct handling of group and having in createCountCommand (Qiang) - Bug: Fixed the bug that CActiveForm generates unnecessary js code about setting focus (Qiang) - Enh #1785: Added CAssetManager::$excludeFiles property to support exclusion of irrelevant files from the publishing process (Y!!) - Enh #1836: The contact form model of the blog demo does now make use of CCaptcha::checkRequirements (Y!!) - Enh #1860: Changed the signature of CValidator::createValidator() to make it easier to use (Qiang) -- Enh #1849: Updated Blueprint CSS to version 1.0 (sebas) +- Enh #1849: Updated Blueprint CSS to version 1.0 (sebas) - Enh: CDbConnection::quoteColumnName and quoteTableName will properly quote table prefix and schema prefix. (Qiang) - Enh: Added CConsoleCommand::init() (Qiang) - Enh: Improved the error display in console command mode (Qiang) - Enh: Added support for using anonymous parameters and global options in console commands (Qiang) - Enh: Added message translations in Czech and Croatia (Qiang) - Enh: Enhanced CFileLogRoute to process the logs faster (Y!!) +- Enh: Improved IDE code completion for Yii::app()-> (Sam Dark) - New #1191: Implemented the database migration feature (Qiang) - New: Added query builder (Qiang) diff --git a/framework/utils/CFileHelper.php b/framework/utils/CFileHelper.php index 00ebdbcf8..82bedc31d 100644 --- a/framework/utils/CFileHelper.php +++ b/framework/utils/CFileHelper.php @@ -218,7 +218,9 @@ class CFileHelper { if(function_exists('finfo_open')) { - $info=$magicFile===null ? finfo_open(FILEINFO_MIME_TYPE) : finfo_open(FILEINFO_MIME_TYPE,$magicFile); + $options=defined('FILEINFO_MIME_TYPE') ? FILEINFO_MIME_TYPE : FILEINFO_MIME; + $info=$magicFile===null ? finfo_open($options) : finfo_open($options,$magicFile); + if($info && ($result=finfo_file($info,$file))!==false) return $result; }