From 3ee82b5ccc5927d75cf36f9dcc2b918cbe1bf7f9 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 18 Jun 2026 08:47:10 +0000 Subject: [PATCH] make sure we have all the necessary parts to calculate lat/lon before attempting (there might be issues in getGps() otherwise) - fix issue #1986 --- include/photos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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']); }