Home » Networking » Net_Ping » Bug #7169
_parseResultwindows not detected on PHP 5
Details
| Submitted | 2006-03-21 09:24 UTC |
|---|---|
| From | andreafrancia at sourceforge dot net |
| Status | Duplicate |
| Package | Net_Ping |
| PHP Version | 5.1.1 |
| OS | Windows XP |
| Roadmaps | (Not assigned) |
Comments
[2006-03-21 09:24 UTC] andreafrancia at sourceforge dot net
Description:
------------
From class Net_Ping_Result:
function _prepareParseResult($sysname)
{
$parse_methods = array_values(get_class_methods('Net_Ping_Result'));
return in_array('_parseresult'.$sysname, $parse_methods);
} /* function _prepareParseResult() */
This does not work because on PHP5 returns the name of the methods as they were declared (case-sensitive). In PHP 4 they were lowercased. (see warning on "get_class_methods" function php.net documentation).
The code should be something like
if (is PHP4 ) {
return in_array('_parseresult'.$sysname, $parse_methods);
} else { // PHP5
return in_array('_parseResult'.$sysname, $parse_methods);
}