From dbceef04e88f9f7c3f40c1ce3b1366c300abb394 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 18 Jun 2012 20:21:54 -0700 Subject: [PATCH] exif_read_data may not be available and isn't a requirement - check and silently ignore exif orientation if it isn't there --- include/Photo.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/Photo.php b/include/Photo.php index 54db9278..3af1691e 100644 --- a/include/Photo.php +++ b/include/Photo.php @@ -143,6 +143,9 @@ class Photo { public function orient($filename) { // based off comment on http://php.net/manual/en/function.imagerotate.php + if(! function_exists('exif_read_data')) + return; + $exif = exif_read_data($filename); $ort = $exif['Orientation'];