########################################################################################## GPXIN-16: A GPX file without speeds will generate a lot of warnings ########################################################################################## Issue Type: Bug ----------------------------------------------------------------------------------------- Issue Information ==================== Priority: Major Status: Closed Resolution: Fixed (2015-01-13 13:02:10) Project: PHP GPXIngest (GPXIN) Reported By: btasker Assigned To: btasker Affected Versions: - 1.02 Targeted for fix in version: - 1.02 Time Estimate: 0 minutes Time Logged: 0 minutes ----------------------------------------------------------------------------------------- Issue Description ================== Where a trackfile does not have speed recorded, you should suppress speed prior to ingest with _suppress('speed')_. However, if this is not done, a number of warnings are generated -- BEGIN SNIPPET -- PHP Warning: max(): Array must contain at least one element in /home/ben/tmp/PHP-GPX-Ingest/GPXIngest.class.php on line 709 PHP Warning: max(): Array must contain at least one element in /home/ben/tmp/PHP-GPX-Ingest/GPXIngest.class.php on line 710 PHP Warning: min(): Array must contain at least one element in /home/ben/tmp/PHP-GPX-Ingest/GPXIngest.class.php on line 711 PHP Warning: min(): Array must contain at least one element in /home/ben/tmp/PHP-GPX-Ingest/GPXIngest.class.php on line 712 PHP Warning: Division by zero in /home/ben/tmp/PHP-GPX-Ingest/GPXIngest.class.php on line 714 PHP Warning: Division by zero in /home/ben/tmp/PHP-GPX-Ingest/GPXIngest.class.php on line 715 PHP Warning: max(): Array must contain at least one element in /home/ben/tmp/PHP-GPX-Ingest/GPXIngest.class.php on line 437 PHP Warning: max(): Array must contain at least one element in /home/ben/tmp/PHP-GPX-Ingest/GPXIngest.class.php on line 438 PHP Warning: min(): Array must contain at least one element in /home/ben/tmp/PHP-GPX-Ingest/GPXIngest.class.php on line 439 PHP Warning: min(): Array must contain at least one element in /home/ben/tmp/PHP-GPX-Ingest/GPXIngest.class.php on line 440 PHP Warning: Division by zero in /home/ben/tmp/PHP-GPX-Ingest/GPXIngest.class.php on line 441 PHP Warning: Division by zero in /home/ben/tmp/PHP-GPX-Ingest/GPXIngest.class.php on line 442 -- END SNIPPET -- It might there-fore be wise to update the class so that it can automatically suppress speed if it finds it's not unavailable - in a web-app, the admin may not have control over the GPX files being submitted, so may not want speed suppressed all the time. ----------------------------------------------------------------------------------------- Activity ========== ----------------------------------------------------------------------------------------- 2015-01-13 13:01:59 btasker ----------------------------------------------------------------------------------------- If a speed value isn't detected, as of commit 54f85b9 speed will automatically be suppressed. ----------------------------------------------------------------------------------------- 2015-01-13 13:02:11 ----------------------------------------------------------------------------------------- btasker changed status from 'Open' to 'Resolved' ----------------------------------------------------------------------------------------- 2015-01-13 13:02:11 ----------------------------------------------------------------------------------------- btasker added 'Fixed' to resolution ----------------------------------------------------------------------------------------- 2015-01-13 13:02:15 ----------------------------------------------------------------------------------------- btasker changed status from 'Resolved' to 'Closed' ----------------------------------------------------------------------------------------- 2015-01-13 13:03:10 git ----------------------------------------------------------------------------------------- -- BEGIN QUOTE -- Repo: PHP-GPX-Ingest Commit: 54f85b958f647b35d0c696107c7bb24f26ce89ae Author: Ben Tasker