]> git.mxchange.org Git - friendica.git/commitdiff
Add check for exif data existence in mod/photos
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 9 Jul 2020 19:03:14 +0000 (15:03 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 9 Jul 2020 19:03:14 +0000 (15:03 -0400)
mod/photos.php

index 2b72fd3e4ec91c70b5d9eb52071d47ab83afd683..f33a9241eff476f4d3cd6c0f8d3cf3752353a930 100644 (file)
@@ -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']);
        }