Home » Web Services » Services_Weather » Bug #6420
Bug in searchLocation in Metar.php
Details
| Submitted | 2006-01-05 16:12 UTC |
|---|---|
| From | office at vao dot pl |
| Status | Bogus |
| Package | Services_Weather |
| PHP Version | 4.4.1 |
| OS | Win XP |
| Roadmaps | (Not assigned) |
Comments
[2006-01-05 16:12 UTC] office at vao dot pl
Description:
------------
In function searchLocation in Services/Weather/Metar.php there is simple bug.
When you generate stations table from txt file (included on http://weather.noaa.gov/tg/site.shtml) then names of cities/airports are with comas (",").
Function searchLocation use expolde function to divide city+country string so when you have for example:
Nenana, Nenana Municipal Airport, United States
then there is an error because function cannot find such place in DB.
My propose is to change coma to || or something more complicated :-)
Greetings
[2006-03-08 12:16 UTC] eru at php dot net
Thank you for taking the time to write to us, but this is not
a bug.
searchLocation("Nenana, Nenana Municipal Airport,,") works just fine, as expected. When you have a location with a comma in it, you have to provide State and Country, or leave them empty, like here ;-)
Sorry for the delayed answer...