diff --git a/lib/private/image.php b/lib/private/image.php index 78cacc8445..07cfb0f72d 100644 --- a/lib/private/image.php +++ b/lib/private/image.php @@ -37,7 +37,7 @@ class OC_Image { */ static public function getMimeTypeForFile($filePath) { // exif_imagetype throws "read error!" if file is less than 12 byte - if (filesize($filePath) > 11) { + if ($filePath !== null && filesize($filePath) > 11) { $imageType = exif_imagetype($filePath); } else { $imageType = false;