mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Issue #5443
This commit is contained in:
@@ -482,14 +482,16 @@ class e_file
|
||||
if(class_exists('finfo')) // Best Mime detection method.
|
||||
{
|
||||
$fin = new finfo(FILEINFO_MIME);
|
||||
list($mime, $other) = explode(";", $fin->file($path_to_file));
|
||||
$result = $fin->file($path_to_file);
|
||||
$parts = explode(";", $result);
|
||||
|
||||
$mime = trim($parts[0]);
|
||||
|
||||
if(!empty($mime))
|
||||
{
|
||||
$finfo['mime'] = $mime;
|
||||
}
|
||||
|
||||
unset($other);
|
||||
|
||||
}
|
||||
|
||||
@@ -515,7 +517,7 @@ class e_file
|
||||
}
|
||||
|
||||
|
||||
if($imgcheck && ($tmp = getimagesize($path_to_file)))
|
||||
if($imgcheck && is_file($path_to_file) && ($tmp = getimagesize($path_to_file)))
|
||||
{
|
||||
$finfo['img-width'] = $tmp[0];
|
||||
$finfo['img-height'] = $tmp[1];
|
||||
|
Reference in New Issue
Block a user