cvs: pear /Services_Weather/Weather Metar.php
| From: | Alexander Wirtz | Date: | Wed, 08 Mar 2006 12:39:18 +0000 |
| Subject: | cvs: pear /Services_Weather/Weather Metar.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-38971@lists.php.net to get a copy of this message | ||
eru Wed Mar 8 12:39:18 2006 UTC
Modified files:
/pear/Services_Weather/Weather Metar.php
Log:
o Fixed rejection of valid ICAO codes by _checkLocationID (Seth Price: Bug #6781)
http://cvs.php.net/viewcvs.cgi/pear/Services_Weather/Weather/Metar.php?r1=1.86&r2=1.87&diff_format=u
Index: pear/Services_Weather/Weather/Metar.php
diff -u pear/Services_Weather/Weather/Metar.php:1.86 pear/Services_Weather/Weather/Metar.php:1.87
--- pear/Services_Weather/Weather/Metar.php:1.86 Wed Mar 8 12:33:22 2006
+++ pear/Services_Weather/Weather/Metar.php Wed Mar 8 12:39:18 2006
@@ -40,7 +40,7 @@
* @author Alexander Wirtz <alex@pc4p.net>
* @copyright 2005 Alexander Wirtz
* @license http://www.opensource.org/licenses/bsd-license.php
BSD License
- * @version CVS: $Id: Metar.php,v 1.86 2006/03/08 12:33:22 eru Exp $
+ * @version CVS: $Id: Metar.php,v 1.87 2006/03/08 12:39:18 eru Exp $
* @link http://pear.php.net/package/Services_Weather
* @link http://weather.noaa.gov/weather/metar.shtml
* @link http://weather.noaa.gov/weather/taf.shtml
@@ -321,7 +321,7 @@
{
if (is_array($id) || is_object($id) || !strlen($id)) {
return Services_Weather::raiseError(SERVICES_WEATHER_ERROR_NO_LOCATION, __FILE__,
__LINE__);
- } elseif (!ctype_alpha($id) || (strlen($id) > 4)) {
+ } elseif (!ctype_alnum($id) || (strlen($id) > 4)) {
return Services_Weather::raiseError(SERVICES_WEATHER_ERROR_INVALID_LOCATION, __FILE__,
__LINE__);
}