orient function uses exif_read_data for which valid image types are only JPEG and TIFF as per the document [1].

When trying to upload an screenshot with png type I was getting message as *failed* even though image was uploading. So added a fix to check image type before calling orient function. Not sure if this is a proper fix but after this i'm not getting any error during file upload

[1] http://au2.php.net/manual/en/function.exif-read-data.php
This commit is contained in:
Vasudev Kamath 2012-07-07 16:17:26 +05:30
parent ba4db236ec
commit 1b3d84422e

View File

@ -740,6 +740,7 @@ function photos_post(&$a) {
killme(); killme();
} }
if($ph->getType() != 'image/png')
$ph->orient($src); $ph->orient($src);
@unlink($src); @unlink($src);