From 5ce13b210ee83a3ee3622d2106589b9c2c4c876a Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 9 Jul 2020 15:03:14 -0400 Subject: [PATCH] Add check for exif data existence in mod/photos --- mod/photos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/photos.php b/mod/photos.php index 2b72fd3e4e..f33a9241ef 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -778,7 +778,7 @@ function photos_post(App $a) // Create item container $lat = $lon = null; - if ($exif && $exif['GPS'] && Feature::isEnabled($page_owner_uid, 'photo_location')) { + if (!empty($exif['GPS']) && Feature::isEnabled($page_owner_uid, 'photo_location')) { $lat = Photo::getGps($exif['GPS']['GPSLatitude'], $exif['GPS']['GPSLatitudeRef']); $lon = Photo::getGps($exif['GPS']['GPSLongitude'], $exif['GPS']['GPSLongitudeRef']); }