Skip to content
This repository has been archived by the owner on Dec 6, 2019. It is now read-only.

NavData.class.php replaces valid waypoint if it contains SID #121

Open
nasserbq opened this issue Dec 15, 2013 · 2 comments
Open

NavData.class.php replaces valid waypoint if it contains SID #121

nasserbq opened this issue Dec 15, 2013 · 2 comments

Comments

@nasserbq
Copy link

The code in core / common / NavData.class.php supposedly strips out any occurrence of "SID" or "STAR" in the route. However, the function used is str_replace:
$route_string = str_replace('SID', '', $route_string);

This causes valid waypoints such as "SIDAD" to be changed to AD with the "SID" part stripped. It caused our VA admin heartache until I dug into the issue.

Recommend perhaps using preg_replace() with regexp to avoid stripping "SID" or "STAR" only when they occur alone and not as a substring.

Thanks.

@Oxymoron290
Copy link

I will verify the issue tomorrow evening.
On Dec 15, 2013 5:45 PM, "nasserbq" [email protected] wrote:

The code in core / common / NavData.class.php supposedly strips out any
occurrence of "SID" or "STAR" in the route. However, the function used is
str_replace:
$route_string = str_replace('SID', '', $route_string);

This causes valid waypoints such as "SIDAD" to be changed to AD with the
"SID" part stripped. It drove our VA admin nuts for a while until I dug
into the issue.

Recommend perhaps using preg_replace() with regexp to avoid stripping
"SID" or "STAR" only when they occur alone and not as a substring.

Thanks.


Reply to this email directly or view it on GitHubhttps://github.com//issues/121
.

@nasserbq
Copy link
Author

nasserbq commented Mar 7, 2015

Any updates on this issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants