PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Networking » Net_DNS » Bug #6899

Net::DNS - Delete record information wrong.

Details

Request #6899Net::DNS - Delete record information wrong.
Submitted2006-02-23 03:22 UTC
Fromphp at holtsmark dot no
StatusClosed
PackageNet_DNS
PHP VersionIrrelevant
OSLinux
Roadmaps(Not assigned)

Comments

[2006-02-23 03:22 UTC] php at holtsmark dot no

Description:
------------
FORMERR when using:

$rrDelete = new Net_DNS_RR("example.com. 0 IN A 192.0.34.166");

print_r on $rrDelete shows $rrDelete->class as 'IN'. This results in FORMERR.

Reading the class, gives me the idea of arguments "delete" and "add" like this:

$rrDelete = new Net_DNS_RR("example.com. 0 IN A 192.0.34.166","delete");

But for that to work, we have to change the Net/DNS/RR.php file. Only two small changes:

###[File: Net/DNS/RR.php: (Line 57) ]###

function Net_DNS_RR($rrdata,$args="")
{
if (is_string($rrdata)) {
$this = $this->new_from_string($rrdata,$args);
} else if (count($rrdata) == 7) {

### END ###
Add $args="" and pass the $args to new_from_string, since it allready takes $update_type = "" as parameter.

[2006-02-24 17:53 UTC] php at holtsmark dot no

Nice