FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=16061&edit=1

ID: 16061
Updated by: [email protected]
Reported By: secrtagnt at gmail dot com
Summary: Invalid argument supplied for foreach()
Status: Verified
Type: Bug
Package: Net_DNSBL
Operating System: Linux 2.6.28-gentoo-r3
Package Version: 1.3.0
PHP Version: 5.2.9
Assigned To: nohn
-Roadmap Versions:
+Roadmap Versions: 1.3.1
New Comment:

-Roadmap Versions:
+Roadmap Versions: 1.3.1

Verfied. Will be fixed soon. Thanks for reporting.


Previous Comments:
------------------------------------------------------------------------

[2009-04-04 13:05:07] nohn

-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: nohn


------------------------------------------------------------------------

[2009-04-03 02:18:22] secrtagnt

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)

------------------------------------------------------------------------

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
grouppear-bugs @
categoriesphp
postedApr 4, '09 at 12:05p
activeApr 4, '09 at 2:33p
posts3
users1
websitepear.php.net

1 user in discussion

Sebastian: 3 posts

People

Translate

site design / logo © 2023 Grokbase