Return early if fileinfo is there.
This commit is contained in:
parent
68d13210bd
commit
fa6ae81149
1 changed files with 1 additions and 0 deletions
|
@ -74,6 +74,7 @@ class Detection {
|
|||
$info = @strtolower(finfo_file($finfo, $path));
|
||||
if ($info) {
|
||||
$mimeType = substr($info, 0, strpos($info, ';'));
|
||||
return empty($mimeType) ? 'application/octet-stream' : $mimeType;
|
||||
}
|
||||
finfo_close($finfo);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue