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

ID: 16061
Updated by: sebastian@nohn.net
Reported By: secrtagnt at gmail dot com
Summary: Invalid argument supplied for foreach()
-Status: Open
+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:
+Assigned To: nohn
Roadmap Versions:
New Comment:

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




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

[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

  • Sebastian at Apr 4, 2009 at 12:06 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=16061&edit=1

    ID: 16061
    Updated by: sebastian@nohn.net
    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)

    ------------------------------------------------------------------------
  • Sebastian at Apr 4, 2009 at 2:33 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=16061&edit=1

    ID: 16061
    Updated by: sebastian@nohn.net
    Reported By: secrtagnt at gmail dot com
    Summary: Invalid argument supplied for foreach()
    -Status: Verified
    +Status: Closed
    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:
    New Comment:

    -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/




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

    [2009-04-04 13:06:55] nohn

    -Roadmap Versions:
    +Roadmap Versions: 1.3.1

    Verfied. Will be fixed soon. Thanks for reporting.

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

    [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)

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

Related Discussions

Discussion Navigation
viewthread | post
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 © 2022 Grokbase