Commit 3ebb6994 authored by Andreas Fischer's avatar Andreas Fischer
Browse files

Do not call filesize(null), this function expects a string.

filesize(null) yields an int on HHVM and thus exif_imagetype(null) is called.
parent 10a0fc28
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment