Skip to content
Permalink
Browse files

Merge branch 'master' of git@github.com:LimeSurvey/LimeSurvey.git int…

…o develop
  • Loading branch information
Shnoulle committed Nov 14, 2019
2 parents abb34b2 + c1cdf24 commit 08a378a2f58e8d6083f165acf7b231bac5e68590
Showing with 7 additions and 2 deletions.
  1. +1 −1 application/controllers/UploaderController.php
  2. +6 −1 application/core/LSFileHelper.php
@@ -204,7 +204,7 @@ public function run($actionID)
Yii::log("Unable to extension for mime type ".$realMimeType,\CLogger::LEVEL_ERROR,'application.controller.uploader.upload');
$return = array(
"success" => false,
"msg" => gT("Sorry, unable to check extension of this file type %s.", $realMimeType),
"msg" => sprintf(gT("Sorry, unable to check extension of this file type %s."), $realMimeType),
);
//header('Content-Type: application/json');
echo ls_json_encode($return);
@@ -68,6 +68,11 @@ public static function getMimeType($file,$magicFile=null,$checkExtension=true)
if(empty($magicFile) && Yii::app()->getConfig('magic_database')) {
$magicFile = Yii::app()->getConfig('magic_database');
}
return parent::getMimeType($file,$magicFile,$checkExtension);
// Some PHP version can throw Notice with some files, disable this notice issue #15565
$iErrorReportingState = error_reporting();
error_reporting(0);
$mimeType = parent::getMimeType($file,$magicFile,$checkExtension);
error_reporting($iErrorReportingState);
return $mimeType;
}
}

0 comments on commit 08a378a

Please sign in to comment.
You can’t perform that action at this time.