GPXIN-16: A GPX file without speeds will generate a lot of warnings



Issue Information

Issue Type: Bug
 
Priority: Major
Status: Closed

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: PHP GPXIngest (GPXIN)
Resolution: Fixed (2015-01-13 13:02:10)
Affects Version: 1.02,
Target version: 1.02,

Created: 2015-01-13 10:15:01
Time Spent Working


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

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         


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.


Toggle State Changes

Activity


If a speed value isn't detected, as of commit 54f85b9 speed will automatically be suppressed.
btasker changed status from 'Open' to 'Resolved'
btasker added 'Fixed' to resolution
btasker changed status from 'Resolved' to 'Closed'

Repo: PHP-GPX-Ingest
Commit: 54f85b958f647b35d0c696107c7bb24f26ce89ae
Author: Ben Tasker <github@<Domain Hidden>>

Date: Tue Jan 13 13:01:24 2015 +0000
Commit Message: Auto-suppressed speed if the GPX file doesn't appear to contain speeds. See GPXIN-16



Modified (-)(+)
-------
GPXIngest.class.php




Webhook User-Agent

GitHub-Hookshot/2f00e0f


View Commit