Skip to content
Unverified Commit 7dd760d7 authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

Test is a file is a valid jpg file



During preview generation if we provide an invalid JPG file the system
errors out with a PHP Fatal Error. Now we can't catch Fatal Errors (in
5.6). I suspect that exif_imagetype to fall back to the extention.

However a valid jpg file has a size. So we request the size of the image
and just drop out if that returns false.

Signed-off-by: default avatarRoeland Jago Douma <roeland@famdouma.nl>
parent 2a8e922d
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