cvs: pear /Services_Weather/Weather Weatherdotcom.php

From: Date: Thu, 10 Nov 2005 10:23:06 +0000
Subject: cvs: pear /Services_Weather/Weather Weatherdotcom.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-36202@lists.php.net to get a copy of this message
eru Thu Nov 10 05:23:06 2005 EDT Modified files: /pear/Services_Weather/Weather Weatherdotcom.php Log: Take HTML-code into account as faulty server reply http://cvs.php.net/diff.php/pear/Services_Weather/Weather/Weatherdotcom.php?r1=1.52&r2=1.53&ty=u Index: pear/Services_Weather/Weather/Weatherdotcom.php diff -u pear/Services_Weather/Weather/Weatherdotcom.php:1.52 pear/Services_Weather/Weather/Weatherdotcom.php:1.53 --- pear/Services_Weather/Weather/Weatherdotcom.php:1.52 Wed Nov 9 19:21:40 2005 +++ pear/Services_Weather/Weather/Weatherdotcom.php Thu Nov 10 05:23:04 2005 @@ -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: Weatherdotcom.php,v 1.52 2005/11/10 00:21:40 eru Exp $ + * @version CVS: $Id: Weatherdotcom.php,v 1.53 2005/11/10 10:23:04 eru Exp $ * @link http://pear.php.net/package/Services_Weather * @link http://www.weather.com/services/xmloap.html * @example examples/weather.com-basic.php weather.com-basic.php @@ -349,9 +349,10 @@ if (Services_Weather::isError($status)) { return Services_Weather::raiseError(SERVICES_WEATHER_ERROR_WRONG_SERVER_DATA, __FILE__, __LINE__); } else { + $root = $this->_unserializer->getRootName(); $search = $this->_unserializer->getUnserializedData(); - if (Services_Weather::isError($search) || $this->_unserializer->getRootName() == "HTML") { + if (Services_Weather::isError($search) || $root == "HTML") { return Services_Weather::raiseError(SERVICES_WEATHER_ERROR_WRONG_SERVER_DATA, __FILE__, __LINE__); } elseif (!is_array($search) || !sizeof($search)) { return Services_Weather::raiseError(SERVICES_WEATHER_ERROR_UNKNOWN_LOCATION, __FILE__, __LINE__);

« previous php.pear.cvs (#36202) next »