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

Bug #16061 Invalid argument supplied for foreach()
Submitted: 2009-04-03 06:18 UTC
From: secrtagnt Assigned: nohn
Status: Closed Package: Net_DNSBL (version 1.3.0)
PHP Version: 5.2.9 OS: Linux 2.6.28-gentoo-r3
Roadmaps: 1.3.1    
Subscription  


 [2009-04-03 06:18 UTC] secrtagnt (Jason Hill)
Description: ------------ Tried a few of the examples listed in the documentation, and while it appears to work, I'm also getting warnings in the output. Test script: --------------- <?php require_once 'Net/DNSBL.php'; $dnsbl = new Net_DNSBL(); $dnsbl->setBlacklists(array('rbl.efnet.org')); if ($dnsbl->isListed($_SERVER['REMOTE_ADDR'])) { var_dump($dnsbl->getDetails($_SERVER['REMOTE_ADDR'])); var_dump($dnsbl->getTxt($_SERVER['REMOTE_ADDR'])); var_dump($dnsbl->getListingBl($_SERVER['REMOTE_ADDR'])); var_dump($dnsbl->getListingRecord($_SERVER['REMOTE_ADDR'])); } ?> Expected result: ---------------- array 'dnsbl' => string 'rbl.efnet.org' (length=13) 'record' => string '127.0.0.4' (length=9) string 'rbl.efnet.org' (length=13) string '127.0.0.4' (length=9) Actual result: -------------- Warning: Invalid argument supplied for foreach() in /usr/share/php/Net/DNSBL.php on line 240 Call Stack # Time Memory Function Location 1 0.0002 66864 {main}( ) ../dnsbl.php:0 2 0.0220 977160 Net_DNSBL->isListed( ) ../dnsbl.php:5 Dump $_SERVER Dump $_GET Dump $_POST Dump $_COOKIE Dump $_FILES Dump $_ENV Dump $_SESSION Dump $_REQUEST array 'dnsbl' => string 'rbl.efnet.org' (length=13) 'record' => string '127.0.0.4' (length=9) string 'rbl.efnet.org' (length=13) string '127.0.0.4' (length=9)

Comments

 [2009-04-04 17:05 UTC] nohn (Sebastian Nohn)
-Status: Open +Status: Verified -Assigned To: +Assigned To: nohn
 [2009-04-04 17:06 UTC] nohn (Sebastian Nohn)
-Roadmap Versions: +Roadmap Versions: 1.3.1
Verfied. Will be fixed soon. Thanks for reporting.
 [2009-04-04 19:33 UTC] nohn (Sebastian Nohn)
-Status: Verified +Status: Closed
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/