mirror of
https://github.com/Intervention/image.git
synced 2025-08-31 01:29:51 +02:00
only determine mime type for files
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user