summaryrefslogtreecommitdiffstats
path: root/lib/private/image.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/image.php')
-rw-r--r--lib/private/image.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/image.php b/lib/private/image.php
index 78cacc84452..07cfb0f72d3 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;