Add check for exif data existence in mod/photos

pull/8854/head
Hypolite Petovan 2020-07-09 15:03:14 -04:00
parent e683bd60ae
commit 5ce13b210e
1 changed files with 1 additions and 1 deletions

View File

@ -778,7 +778,7 @@ function photos_post(App $a)
// Create item container // Create item container
$lat = $lon = null; $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']); $lat = Photo::getGps($exif['GPS']['GPSLatitude'], $exif['GPS']['GPSLatitudeRef']);
$lon = Photo::getGps($exif['GPS']['GPSLongitude'], $exif['GPS']['GPSLongitudeRef']); $lon = Photo::getGps($exif['GPS']['GPSLongitude'], $exif['GPS']['GPSLongitudeRef']);
} }