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 #621

Call to undefined function

Details

Submitted2004-01-24 17:18 UTC
Fromrick at emery dot homelinux dot net
Assignederu
StatusClosed
PackageServices_Weather
PHP Version4.3.2
OSLinux (Red Hat 7.3)
Roadmaps(Not assigned)

Comments

[2004-01-24 17:18 UTC] rick at emery dot homelinux dot net

Description:
------------
If I try to retrieve weather information from weather.com using a location ID of 99999, then check for a returned pear error, I get this at the top of the page:

Fatal error: Call to undefined function: _errormessage() in /usr/share/pear/Services/Weather/Weatherdotcom.php on line 187

Using version 1.2.0 of Services_Weather.

Reproduce code:
---------------
require_once "Services/Weather.php";
$weatherDotCom = &Services_Weather::service("WeatherDotCom");
$search = '99999';
$location = $weatherDotCom->getLocation($search);
if (is_a($location, 'PEAR_Error')) {
return $location;
} else {
return 'Worked';
}

Expected result:
----------------
I expected to have a pear error returned (to the effect that the location was invalid).

Actual result:
--------------
Fatal error: Call to undefined function: _errormessage() in /usr/share/pear/Services/Weather/Weatherdotcom.php on line 187

[2004-01-24 17:56 UTC] eru at php dot net

This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.

In case this was a pear.php.net website problem, the change will show
up on the website in short time.

Thank you for the report, and for helping us make PEAR better.

The function was a leftover I forgot to remove. Now the call goes to raiseError($errno), which needs a keyAttribute => type for proper error-code retrieval in the weather.conm reply.