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: Roeland Jago Douma <roeland@famdouma.nl>
As discussed we move all old style classes (OC_FOO_BAR) to legacy.
Then from there we can evaluate the need to convert them back or if they
can be fully deprecated/deleted.