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

Request #16890 catch errors in ipInNetwork()
Submitted: 2009-12-08 19:33 UTC
From: malin Assigned: fa
Status: Closed Package: Net_IPv4 (version 1.3.1)
PHP Version: 5.2.0 OS: debian etch
Roadmaps: (Not assigned)    
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 : 49 - 1 = ?

 
 [2009-12-08 19:33 UTC] malin (Matthias Huether)
Description: ------------ ipInNetwork() should stop execution, if Net_IPv4::parseAddress($network) returns an error, e .g. #438 if ($network instanceof PEAR_Error) return false; Test script: --------------- echo Net_IPv4::ipInNetwork('10.10.10.23', '10.10.10.0/48'); Expected result: ---------------- 0 Actual result: -------------- Notice: Undefined property: PEAR_Error::$network in /usr/share/php/PEAR/Net/IPv4.php on line 440 Notice: Undefined property: PEAR_Error::$broadcast in /usr/share/php/PEAR/Net/IPv4.php on line 441 0

Comments

 [2010-08-07 18:29 UTC] fa (Florian Anderiasch)
-Status: Open +Status: Closed -Assigned To: +Assigned To: fa
This bug has been fixed in SVN. 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.
 [2010-09-05 08:50 UTC] pcmaster (Shinya Sasaki)
This bug is not fixed and A new bug is invented. Test script: --------------- var_dump(Net_IPv4::ipInNetwork('10.10.10.23', '10.10.10.0/48')); var_dump(Net_IPv4::ipInNetwork('10.10.10.23', '10.10.10.0/24')); Expected result: ---------------- bool(false) bool(true) Actual result: -------------- PHP Notice: Undefined property: PEAR_Error::$network in /Users/pcmaster/Downloads/Net_IPv4-1.3.2/Net_IPv4-1.3.2/Net/IPv4.php on line 442 PHP Notice: Undefined property: PEAR_Error::$broadcast in /Users/pcmaster/Downloads/Net_IPv4-1.3.2/Net_IPv4-1.3.2/Net/IPv4.php on line 443 bool(false) bool(false)