That explains it. Try this, restore the original block:
if (function_exists('finfo_file') && function_exists('finfo_open')) {
$finfo = finfo_open(FILEINFO_MIME_TYPE);
$fileMime = finfo_file($finfo, $file);
} else if (function_exists('mime_content_type')) {
$fileMime = mime_content_type($file);
} else {
// *WARNING* There's no way check the mime type of the file, you should not blindly trust on your users' input!
$ftmp = Params::getFiles('qqfile');
$fileMime = @$ftmp['type'];
}
But replace "FILEINFO_MIME_TYPE" with "FILEINFO_MIME", see if then everything's all right.
Regards