Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse of GPX file failse if lastpointTime is not prestent #26

Closed
roynijkamp opened this issue Mar 5, 2018 · 3 comments
Closed

Parse of GPX file failse if lastpointTime is not prestent #26

roynijkamp opened this issue Mar 5, 2018 · 3 comments
Assignees

Comments

@roynijkamp
Copy link
Contributor

When you try to parse a GPX file with only a timestamp on the firstpoint there will be an error.

I fixed the issue in the file Models/Segment.php with a check for the var $lastPoint->time
I changed line 100 from:
if (isset($firstPoint->time) && $firstPoint->time instanceof \DateTime) {
TO
if (isset($firstPoint->time) && isset($lastPoint->time) && $firstPoint->time instanceof \DateTime) {

@Sibyx
Copy link
Owner

Sibyx commented Mar 5, 2018

Hi @roynijkamp,
thank you very much for reporting the issue. Would you like to create a pull request? (Just to know if I can push the fix by myself.)

@roynijkamp
Copy link
Contributor Author

@Sibyx i created a pull request! Thanks for you're response

@Sibyx Sibyx assigned Sibyx and roynijkamp and unassigned Sibyx Mar 6, 2018
@Sibyx
Copy link
Owner

Sibyx commented Mar 6, 2018

Resolved with #27

@Sibyx Sibyx closed this as completed Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants