From: friendica Date: Wed, 5 Sep 2012 11:02:30 +0000 (-0700) Subject: ignore exif orientation if we can't parse the particular flavour of exif X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9e5fa5b9a9462bf4642b075db925f5b5ff799c2d;p=friendica.git ignore exif orientation if we can't parse the particular flavour of exif --- diff --git a/include/Photo.php b/include/Photo.php index 74d4c746d6..5b6e6d846c 100644 --- a/include/Photo.php +++ b/include/Photo.php @@ -295,7 +295,11 @@ class Photo { if( (! function_exists('exif_read_data')) || ($this->getType() !== 'image/jpeg') ) return; - $exif = exif_read_data($filename); + $exif = @exif_read_data($filename); + + if(! $exif) + return; + $ort = $exif['Orientation']; switch($ort)