mirror of
https://github.com/Intervention/image.git
synced 2025-02-06 22:00:38 +01:00
only determine mime type for files
This commit is contained in:
parent
e0d9c258ce
commit
8692a77fb6
@ -52,7 +52,7 @@ class File
|
||||
$this->extension = array_key_exists('extension', $info) ? $info['extension'] : null;
|
||||
$this->filename = array_key_exists('filename', $info) ? $info['filename'] : null;
|
||||
|
||||
if (file_exists($path)) {
|
||||
if (file_exists($path) && is_file($path)) {
|
||||
$this->mime = finfo_file(finfo_open(FILEINFO_MIME_TYPE), $path);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user