]> git.mxchange.org Git - friendica.git/commitdiff
ignore exif orientation if we can't parse the particular flavour of exif
authorfriendica <info@friendica.com>
Wed, 5 Sep 2012 11:02:30 +0000 (04:02 -0700)
committerfriendica <info@friendica.com>
Wed, 5 Sep 2012 11:02:30 +0000 (04:02 -0700)
include/Photo.php

index 74d4c746d6f89eefbd05f4326f95d18be8e03d99..5b6e6d846c700d9068cfd406c9453d4d353b1ee4 100644 (file)
@@ -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)