Add check for exif data existence in mod/photos
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user