diff options
author | Andreas Fischer <bantu@owncloud.com> | 2014-12-18 20:42:35 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@owncloud.com> | 2014-12-18 20:57:19 +0100 |
commit | 3ebb69944bd2774d2193dc225bcad447d47296d2 (patch) | |
tree | ecb361a311dcbc0590814bc63647f815807bb2ad /lib/private/image.php | |
parent | 10a0fc2856bfa68ff04a42f141829a6e66a9b2da (diff) | |
download | nextcloud-server-3ebb69944bd2774d2193dc225bcad447d47296d2.tar.gz nextcloud-server-3ebb69944bd2774d2193dc225bcad447d47296d2.zip |
Do not call filesize(null), this function expects a string.
filesize(null) yields an int on HHVM and thus exif_imagetype(null) is called.
Diffstat (limited to 'lib/private/image.php')
-rw-r--r-- | lib/private/image.php | 2 |
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; |