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

Fix empty lineName on chekin via API #3184

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

tiuub
Copy link
Contributor

@tiuub tiuub commented Jan 21, 2025

Hi there ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ

I'm currently developing an Easy Import Shourtcut for iOS to quickly import a trip from the DB Navigator to Traewelling. There I discovered a rather oddly bug happening while checking in with the tripID through the API. Some checkins got a lineName and some didn't. I figured out, that it depends on rather a trip was cached earlier or not. Therefore I took a quick look in the source code.

The fetchHafasTrip(string $tripID, string $lineName) sets the lineName only if the lineName is present in $cachedData. This leads to an empty lineName if the trip wasn't fetched beforehand. Nevertheless the function requires passing the $lineName parameter, but is never using it in the context of the function. The fix would be to set $tripLineName to $lienName if there is no cached lineName.

Kind regards
tiuub ๐Ÿ˜

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

Successfully merging this pull request may close these issues.

2 participants