make sure we have all the necessary parts to calculate lat/lon before attempting (there might be issues in getGps() otherwise) - fix issue #1986

This commit is contained in:
Mario
2026-06-18 08:47:10 +00:00
parent d4401faed5
commit 3ee82b5ccc

View File

@@ -344,7 +344,7 @@ function photo_upload($channel, $observer, $args) {
elseif (array_key_exists('GPSLatitude', $exif)) { elseif (array_key_exists('GPSLatitude', $exif)) {
$gps = $exif; $gps = $exif;
} }
if ($gps) { if (isset($gps['GPSLatitude'], $gps['GPSLatitudeRef'], $gps['GPSLongitude'], $gps['GPSLongitudeRef'])) {
$lat = getGps($gps['GPSLatitude'], $gps['GPSLatitudeRef']); $lat = getGps($gps['GPSLatitude'], $gps['GPSLatitudeRef']);
$lon = getGps($gps['GPSLongitude'], $gps['GPSLongitudeRef']); $lon = getGps($gps['GPSLongitude'], $gps['GPSLongitudeRef']);
} }