Bug #17474 [Ana->Csd]: Notice: Trying to get property of non-object in /usr/lib/php/Net/DNSBL.php on
| From: | sebastian at nohn dot net | Date: | Sat, 23 Oct 2010 09:02:16 +0000 |
| Subject: | Bug #17474 [Ana->Csd]: 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-4958@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: sebastian@nohn.net
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: Analyzed
+Status: Closed
Type: Bug
Package: Net_DNSBL
Operating System: Linux
Package Version: 1.3.3
PHP Version: 5.3.2
-Assigned To:
+Assigned To: nohn
Roadmap Versions:
New Comment:
-Status: Analyzed
+Status: Closed
-Assigned To:
+Assigned To: nohn
This bug has been fixed in SVN.
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.
Previous Comments:
------------------------------------------------------------------------
[2010-10-21 01:14:08] hm2k
Can someone apply this fix already?
------------------------------------------------------------------------
[2010-07-21 09:41:19] hm2k
Added #patch
bug:17474;patch:dnsbl-ip-resolver-bugfix;revision:1279705279;.
------------------------------------------------------------------------
[2010-07-21 09:32:47] hm2k
I realised a mistake when installing the SVN version...
s/pear install Net_DNSBL/pear install Net_DNSBL/package.xml
[root@svr ~]# pear install Net_DNSBL/package.xml
install ok: channel://pear.php.net/Net_DNSBL-1.3.4dev
---
Here's an updated version of the error:
For 127.0.0.2:
bool(true) string(20) "sbl-xbl.spamhaus.org"
For 127.0.0.2.:
bool(true) string(20) "sbl-xbl.spamhaus.org"
For maga.info.:
Notice: Trying to get property of non-object in
/usr/share/pear/Net/DNSBL.php on line 291
Notice: Trying to get property of non-object in
/usr/share/pear/Net/DNSBL.php on line 291
Notice: Trying to get property of non-object in
/usr/share/pear/Net/DNSBL.php on line 291
Notice: Trying to get property of non-object in
/usr/share/pear/Net/DNSBL.php on line 291
Notice: Trying to get property of non-object in
/usr/share/pear/Net/DNSBL.php on line 291
Notice: Trying to get property of non-object in
/usr/share/pear/Net/DNSBL.php on line 291
bool(true) string(14) "bl.spamcop.net"
---
Code to reproduce:
<?php
$hosts[]='127.0.0.2'; //known test entry
$hosts[]='127.0.0.2.';
$hosts[]='maga.info.'; //produces an error
require_once 'Net/DNSBL.php';
$dnsbl = new Net_DNSBL();
foreach ($hosts as $host) {
echo "<p>For $host:</p>";
var_dump($dnsbl->isListed($host));
var_dump($dnsbl->getListingBl($host));
}
?>
---
Can you confirm that you are able to reproduce this bug?
Thanks.
------------------------------------------------------------------------
[2010-07-07 12:41:54] hm2k
Are you able to replicate this bug or do you require further
information?
Thanks.
------------------------------------------------------------------------
[2010-06-09 15:34:17] hm2k
My mistake, I am unable to replicate the bug using:
"127.0.0.2"
However, the bug appears when using:
"127.0.0.2."
With regards to the getHostForLookup function, why not change
dependencies from Net_CheckIP to filter_var with FILTER_VALIDATE_IP?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=17474
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=17474&edit=1