Github #19 reports that in order to successfully import a specific file, the user had to suppress a number of elements
$gpx->suppress('speed');
$gpx->suppress('elevation');
$gpx->suppress('location');
$gpx->suppress('date');
It's odd that speed (in particular) needed to be suppressed, as
GPXIN-16 was supposed to implement auto-detection.
However, the user's GPX file uses a route (support added in GPX-27) so it may be related to that.
Running a quick test, failure to do so doesn't just generate NOTICE level errors, but also results in a fatal:
Fatal error: Cannot access empty property in /home/ben/Documents/src.old/PHP-GPX-Ingest/src/GPXIngest/GPXIngest.php on line 573
Activity
2017-07-03 09:32:28
(They added the isset and empty checks)
So, looking at that, it's not that speed etc isn't getting suppressed (though elevation and location may not be) but that that section makes the assumption that there'll be a track present. In the given example GPX file, this isn't the case and there's only a route.
2017-07-03 09:32:53
2017-07-03 09:39:29
Looks like there's more than a little bit of tidying to do.
2017-07-03 09:40:09
2017-07-03 09:40:33
2017-07-03 09:48:28
However, the statements causing the issue, will fire either way. They don't currently process any data from routes though, so the simplest initial fix would be to move them out to a new method and have that check first whether any tracks have been processed
2017-07-03 10:17:30
Webhook User-Agent
View Commit
2017-07-03 10:19:27
2017-07-04 10:11:03
2017-07-04 10:11:03
2017-07-04 10:11:07