1
0
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:
Oliver Vogel 2014-05-31 11:37:00 +02:00
parent e0d9c258ce
commit 8692a77fb6

View File

@ -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);
}