Bug #17474 [Opn]: Notice: Trying to get property of non-object in /usr/lib/php/Net/DNSBL.php on
| From: | daniel dot oconnor at gmail dot com | Date: | Mon, 07 Jun 2010 23:41:57 +0000 |
| Subject: | Bug #17474 [Opn]: Notice: Trying to get property of non-object in /usr/lib/php/Net/DNSBL.php on | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-3895@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=17474&edit=1
ID: 17474
Updated by: daniel.oconnor@gmail.com
Reported By: hm2k at php dot net
Summary: Notice: Trying to get property of non-object in
/usr/lib/php/Net/DNSBL.php on
Status: Open
Type: Bug
Package: Net_DNSBL
Operating System: Linux
Package Version: 1.3.3
PHP Version: 5.3.2
Roadmap Versions:
New Comment:
Can I get you to try the latest SVN version?
The line numbers are slightly off.
Otherwise, I assume it's getHostForLookup() assuming there's always a
well formed response.
protected function getHostForLookup($host, $blacklist)
{
// Currently only works for v4 addresses.
if (!Net_CheckIP::check_ip($host)) {
$resolver = new Net_DNS_Resolver;
$response = $resolver->query($host);
$ip = $response->answer[0]->address;
} else {
$ip = $host;
}
return $this->buildLookUpHost($ip, $blacklist);
} /
Previous Comments:
------------------------------------------------------------------------
[2010-06-07 21:01:25] hm2k
Description:
------------
Looking up a host that is in a DNS Blacklist results in the following
errors:
Notice: Trying to get property of non-object in
/usr/lib/php/Net/DNSBL.php on line 286
Test script:
---------------
<?
$host='maga.info';
//pear install Net_DNSBL-1.3.3
require_once 'Net/DNSBL.php';
$dnsbl = new Net_DNSBL();
if ($dnsbl->isListed($host)) { echo $dnsbl->getListingBl($host); }
?>
Expected result:
----------------
bl.spamcop.net
Actual result:
--------------
Notice: Trying to get property of non-object in
/usr/lib/php/Net/DNSBL.php on line 286
Notice: Trying to get property of non-object in
/usr/lib/php/Net/DNSBL.php on line 286
Notice: Trying to get property of non-object in
/usr/lib/php/Net/DNSBL.php on line 286
Notice: Trying to get property of non-object in
/usr/lib/php/Net/DNSBL.php on line 286
Notice: Trying to get property of non-object in
/usr/lib/php/Net/DNSBL.php on line 286
Notice: Trying to get property of non-object in
/usr/lib/php/Net/DNSBL.php on line 286
bl.spamcop.net
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=17474&edit=1