diff --git a/include/photos.php b/include/photos.php index dc2a3e58a..609811fd6 100644 --- a/include/photos.php +++ b/include/photos.php @@ -344,7 +344,7 @@ function photo_upload($channel, $observer, $args) { elseif (array_key_exists('GPSLatitude', $exif)) { $gps = $exif; } - if ($gps) { + if (isset($gps['GPSLatitude'], $gps['GPSLatitudeRef'], $gps['GPSLongitude'], $gps['GPSLongitudeRef'])) { $lat = getGps($gps['GPSLatitude'], $gps['GPSLatitudeRef']); $lon = getGps($gps['GPSLongitude'], $gps['GPSLongitudeRef']); }