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

Bug #16382 getListingBL() breaks silently if isListed() was called with 2nd parameter
Submitted: 2009-06-26 22:36 UTC
From: scottp Assigned: nohn
Status: Closed Package: Net_DNSBL (version 1.3.3)
PHP Version: 5.2.5 OS: Linux 2.6.28-12 (Ubuntu 9.04)
Roadmaps: 1.3.4    
Subscription  


 [2009-06-26 22:36 UTC] scottp (Scott Prive)
Description: ------------ getListingBL() breaks silently if isListed() was called with 2nd parameter. No error is returned, and no results are returned at all (which is misleading). I understand that this is user error. The mistake can be nasty as it is not a failure in how getListingBl() was called, but instead due to a previous method call. This also happens on 1.3.2 package version. note: my PHP version is: PHP 5.2.6-3ubuntu4.1 with Suhosin-Patch 0.9.6.2 (cli) (built: Apr 23 2009 14:35:05) Test script: --------------- <?php require_once 'Net/DNSBL.php'; function get_dnsbl_array2($ip) { $dnsbl = new Net_DNSBL(); $rbls = array('bl.spamcop.net','b.barracudacentral.org'); $dnsbl->setBlacklists($rbls); if ($dnsbl->isListed($ip, TRUE)) { echo 'getListingBl - Listed in '.print_r($dnsbl->getListingBl($ip), TRUE)."\n"; echo 'getListingBls - Listed in '.print_r($dnsbl->getListingBls($ip), TRUE)."\n"; #echo "\n###\nThe object contains:" . print_r($dnsbl,TRUE)." [end object] ###\n"; } } #get_dnsbl_array2("125.110.99.250"); get_dnsbl_array2("77.104.239.1"); ?> Expected result: ---------------- getListingBl() should return an explicit error if it is called with the wrong number of arguments. Actual result: -------------- getListingBl - Listed in getListingBls - Listed in Array ( [0] => bl.spamcop.net [1] => b.barracudacentral.org )

Comments

 [2009-06-27 15:46 UTC] nohn (Sebastian Nohn)
-Status: Open +Status: Closed -Assigned To: +Assigned To: nohn -Roadmap Versions: +Roadmap Versions: 1.3.4
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.