From 3c0f02312146b426449b01b3121d3249ccae4b98 Mon Sep 17 00:00:00 2001 From: Bartek Fabiszewski Date: Tue, 23 May 2017 09:40:40 +0200 Subject: [PATCH] Skip missing nodes on gpx import --- utils/import.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/import.php b/utils/import.php index 3f199f3..2543f92 100755 --- a/utils/import.php +++ b/utils/import.php @@ -99,7 +99,9 @@ foreach ($gpx->trk as $trk) { foreach($trk->trkseg as $segment) { foreach($segment->trkpt as $point) { $ret = $position->add($user->id, $trackId, - strtotime($point->time), $point["lat"], $point["lon"], $point->ele, + (($point->time) ? strtotime($point->time) : NULL), + $point["lat"], $point["lon"], + (($point->ele) ? $point->ele : NULL), NULL, NULL, NULL, "gps", NULL, NULL); if ($ret === false) { uUtils::exitWithError($lang["servererror"]);