Skip to content

Commit

Permalink
Fixes #1393: CFileHelper::getMimeTypeByExtension() used to treat $mag…
Browse files Browse the repository at this point in the history
…icFile parameter as array with MIME-types, but not the string containing path of the file with MIME-types as it should be.
  • Loading branch information
resurtm committed Sep 21, 2012
1 parent e607bbc commit 5203a3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/utils/CFileHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public static function getMimeTypeByExtension($file,$magicFile=null)
{
static $extensions, $customExtensions;
if($magicFile===null && $extensions===null)
$extensions=require(Yii::$customExtensions('system.utils.mimeTypes').'.php');
$extensions=require(Yii::getPathOfAlias('system.utils.mimeTypes').'.php');
else if($magicFile!==null && $customExtensions===null)
$customExtensions=require($magicFile);
if(($ext=pathinfo($file, PATHINFO_EXTENSION))!=='')
Expand Down

0 comments on commit 5203a3d

Please sign in to comment.