mirror of
https://github.com/yiisoft/yii.git
synced 2026-03-07 00:26:52 +01:00
merge from 1.0
This commit is contained in:
@@ -196,12 +196,12 @@ class CFileHelper
|
||||
{
|
||||
if(function_exists('finfo_open'))
|
||||
{
|
||||
if($info=finfo_open(FILEINFO_MIME))
|
||||
return finfo_file($info,$file);
|
||||
if(($info=finfo_open(FILEINFO_MIME)) && ($result=finfo_file($info,$file))!==false)
|
||||
return $result;
|
||||
}
|
||||
|
||||
if(function_exists('mime_content_type'))
|
||||
return mime_content_type($file);
|
||||
if(function_exists('mime_content_type') && ($result=mime_content_type($file))!==false)
|
||||
return $result;
|
||||
|
||||
return self::getMimeTypeByExtension($file);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user