PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Web Services » Services_Weather » Bug #6420

Bug in searchLocation in Metar.php

Details

Submitted2006-01-05 16:12 UTC
Fromoffice at vao dot pl
StatusBogus
PackageServices_Weather
PHP Version4.4.1
OSWin 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...