PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Networking » Net_DNS » Bug #678

resolver doesn't like hostname ending by '.'

Details

Submitted2004-02-04 02:47 UTC
Fromcmoulin at simplerezo dot com
Assignedekilfoil
StatusClosed
PackageNet_DNS
PHP Version4.3.4
OSFreeBSD 4.9p1
Roadmaps(Not assigned)

Comments

[2004-02-04 02:47 UTC] cmoulin at simplerezo dot com

Description:
------------
The search doesn't appreciate much a fully qualified host name (ending by '.')...

Reproduce code:
---------------
<?php
require_once 'Net/DNS.php';
$dnsr = new Net_DNS_Resolver();

$dnsr->search('4.3.2.1.dnsbl.sorbs.net.');
?>

Expected result:
----------------
it should world like this:
<?php
require_once 'Net/DNS.php';
$dnsr = new Net_DNS_Resolver();

$dnsr->search('4.3.2.1.dnsbl.sorbs.net');
?>

Actual result:
--------------
Notice: Undefined offset: 0 in /usr/local/share/pear/Net/DNS.php on line 412

Notice: Undefined offset: 256 in /usr/local/share/pear/Net/DNS.php on line 470

Notice: Undefined index: in /usr/local/share/pear/Net/DNS.php on line 346

Notice: Undefined index: in /usr/local/share/pear/Net/DNS.php on line 444

[2005-04-08 10:15 UTC] cox at idecnet dot com

Fixed in CVS. Thanks for the report!

Tomas V.V.Cox