PEAR is archived and read-only

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

Home » Networking » Net_Traceroute » Bug #3962

_prepareParseResult fails in Net_Traceroute_Result

Details

Submitted2005-03-25 22:47 UTC
Frombertolinisj at earthlink dot net
Assignedneufeind
StatusClosed
PackageNet_Traceroute
PHP Version5.0.0
OSwindows 200 + XP
Roadmaps(Not assigned)

Comments

[2005-03-25 22:47 UTC] bertolinisj at earthlink dot net

Description:
------------
The _prepareParseResult function of the Net_Traceroute_Result Container Class always returns false on Windows 200 and XP.

I applied the same fix as the one used for BUG #2314 for NET_Ping and it appears to fix the issue.

*/
function _prepareParseResult($sysname)
{
- return in_array(strtolower('_parseresult'.$sysname),get_class_methods('Net_Traceroute_Result'));

+ $parse_methods = array_values(array_map('strtolower',get_class_methods('Net_Traceroute_Result')));
return in_array('_parseresult'.$sysname,
$parse_methods);
} /* function _prepareParseResult() */

Reproduce code:
---------------
if(!PEAR::isError($objtrace))
{
$response = $objtrace->traceroute('www.google.com');
print_r($response);
}

Expected result:
----------------
$response should be a Net_Traceroute_Result object.

Actual result:
--------------
Pear Error , Backend not supported.

[2006-04-16 23:47 UTC] elmo at muppets dot com

I also stumbled across this problem and corrected it by manually patching the _prepareParseResult function in Traceroute.php

Please release a patched version of Net_Traceroute, as many people might be losing their time with this bug.

I'm using PHP 5.1.2, PEAR 1.4.6 and Net_Traceroute 0.21

Thanks