Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.4.5

Bug #7735 Net_Ping suffers from many E_NOTICE errors
Submitted: 2006-05-27 02:52 UTC
From: doconnor Assigned: cconstantine
Status: Closed Package: Net_Ping (version 2.4.1)
PHP Version: 5.1.4 OS:
Roadmaps: 2.4.3    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 47 - 11 = ?

 
 [2006-05-27 02:52 UTC] doconnor (Daniel O'Connor)
Description: ------------ When your warning levels are set to show up a lot of E_NOTICE problems. simply checking array_key_exists, empty or isset would make this code behave a little better. Test script: --------------- require_once 'Net/Ping.php'; $n = new Net_URL('http://www.whereever.com/'); $ping = new Net_Ping('ping', "windows"); $result = $ping->ping($n->host); $ip = $result->getTargetIP(); Expected result: ---------------- No notice errors Actual result: -------------- Notice: Undefined offset: 1 in c:\php\PEAR\Net\Ping.php on line 887 Notice: Undefined offset: 4 in c:\php\PEAR\Net\Ping.php on line 888 Notice: Undefined offset: 2 in c:\php\PEAR\Net\Ping.php on line 890 Notice: Undefined offset: -2 in c:\php\PEAR\Net\Ping.php on line 892 Notice: Undefined offset: 1 in c:\php\PEAR\Net\Ping.php on line 894 Notice: Undefined offset: 1 in c:\php\PEAR\Net\Ping.php on line 896 Notice: Undefined offset: 1 in c:\php\PEAR\Net\Ping.php on line 897 Notice: Undefined offset: 2 in c:\php\PEAR\Net\Ping.php on line 899 Notice: Undefined offset: 1 in c:\php\PEAR\Net\Ping.php on line 900 Notice: Undefined offset: 1 in c:\php\PEAR\Net\Ping.php on line 903 Notice: Undefined offset: 3 in c:\php\PEAR\Net\Ping.php on line 904 Notice: Undefined offset: 5 in c:\php\PEAR\Net\Ping.php on line 905 S Notice: Undefined offset: 1 in c:\php\PEAR\Net\Ping.php on line 887 Notice: Undefined offset: 4 in c:\php\PEAR\Net\Ping.php on line 888 Notice: Undefined offset: 2 in c:\php\PEAR\Net\Ping.php on line 890 Notice: Undefined offset: -2 in c:\php\PEAR\Net\Ping.php on line 892 Notice: Undefined offset: 1 in c:\php\PEAR\Net\Ping.php on line 894 Notice: Undefined offset: 1 in c:\php\PEAR\Net\Ping.php on line 896 Notice: Undefined offset: 1 in c:\php\PEAR\Net\Ping.php on line 897 Notice: Undefined offset: 2 in c:\php\PEAR\Net\Ping.php on line 899 Notice: Undefined offset: 1 in c:\php\PEAR\Net\Ping.php on line 900 Notice: Undefined offset: 1 in c:\php\PEAR\Net\Ping.php on line 903 Notice: Undefined offset: 3 in c:\php\PEAR\Net\Ping.php on line 904 Notice: Undefined offset: 5 in c:\php\PEAR\Net\Ping.php on line 905

Comments

 [2007-07-09 13:26 UTC] cconstantine (Craig Constantine)
The E_NOTICE errors are in the ping output parsing (which is being rewritten for 2.4.3). I'm moving this bug to the roadmap for 2.4.3 so I can get 2.4.2 released.
 [2007-12-27 23:05 UTC] cconstantine (Craig Constantine)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.