Skip missing nodes on gpx import

This commit is contained in:
Bartek Fabiszewski 2017-05-23 09:40:40 +02:00
parent 123b2ce967
commit 3c0f023121

View File

@ -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"]);