summaryrefslogtreecommitdiffstats
path: root/lib/private/image.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2014-12-18 20:42:35 +0100
committerAndreas Fischer <bantu@owncloud.com>2014-12-18 20:57:19 +0100
commit3ebb69944bd2774d2193dc225bcad447d47296d2 (patch)
treeecb361a311dcbc0590814bc63647f815807bb2ad /lib/private/image.php
parent10a0fc2856bfa68ff04a42f141829a6e66a9b2da (diff)
downloadnextcloud-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.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;