The script is supposed to support multiple tracks, however, whilst it iterates over them it fails to increase the numeric key used for that track (or within the codebase - journey) and so essentially overwrites the previously processed tracks.
Commit f8a5bd8 had an error - I missed renaming one instance of a, so all journey names were being set to "journey" leading to the same behaviour as previously. Commit 82df920 fixes
Activity
2016-02-13 10:57:08
The script is supposed to support multiple tracks, however, whilst it iterates over them it fails to increase the numeric key used for that track (or within the codebase - journey) and so essentially overwrites the previously processed tracks.
Variable is defined here - https://github.com/bentasker/PHP-GPX-Ingest/blob/master/GPXIngest.class.php#L232
Used here - https://github.com/bentasker/PHP-GPX-Ingest/blob/master/GPXIngest.class.php#L243
But never incremented
2016-02-13 10:57:21
2016-02-13 10:57:21
2016-02-13 11:00:04
2016-02-13 11:00:52
Should also look at renaming the variable to something more meaningful
2016-02-13 11:01:27
Webhook User-Agent
View Commit
2016-02-13 11:03:27
Webhook User-Agent
View Commit
2016-02-13 11:49:27
Webhook User-Agent
View Commit
2016-02-13 11:52:17
~# cat test.php <?php include 'GPXIngest.class.php'; $gpx = new GPXIngest(); $gpx->loadFile('20130518.gpx'); $gpx->ingest(); print_r($gpx->getTrackIDs()); ~# php test.php Array ( [0] => journey0 [1] => journey1 [2] => journey2 [3] => journey3 [4] => journey4 [5] => journey5 [6] => journey6 [7] => journey7 [8] => journey8 [9] => journey9 [10] => journey10 [11] => journey11 [12] => journey12 [13] => journey13 [14] => journey14 [15] => journey15 )2016-02-13 11:54:02
2016-02-13 11:55:04
2016-02-13 11:55:04
2016-02-13 11:55:04
2016-02-13 11:55:10