From d4fee58c881c684477acd8d65ea757dfaed7290a Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Tue, 16 May 2023 21:22:26 -0700 Subject: [PATCH] tw: prevent discarding S/W coordinates (fix #649) Signed-off-by: Varun Patil --- lib/Db/TimelineWritePlaces.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Db/TimelineWritePlaces.php b/lib/Db/TimelineWritePlaces.php index 99905384..2c9c113d 100644 --- a/lib/Db/TimelineWritePlaces.php +++ b/lib/Db/TimelineWritePlaces.php @@ -179,7 +179,9 @@ trait TimelineWritePlaces $lon = \array_key_exists(LON_KEY, $exif) ? round((float) $exif[LON_KEY], 6) : null; // Make sure we have valid coordinates - if (null === $lat || null === $lon || abs($lat) > 90 || abs($lon) > 180 || ($lat < 0.00001 && $lon < 0.00001)) { + if (null === $lat || null === $lon + || abs($lat) > 90 || abs($lon) > 180 + || (abs($lat) < 0.00001 && abs($lon) < 0.00001)) { $lat = $lon = null; }