Skip to content
Snippets Groups Projects
Commit fa6ae811 authored by Andreas Fischer's avatar Andreas Fischer
Browse files

Return early if fileinfo is there.

parent 68d13210
Branches
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment