tw: prevent discarding S/W coordinates (fix #649)

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/653/head
Varun Patil 2023-05-16 21:22:26 -07:00
parent 7f54512d59
commit d4fee58c88
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}