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 #2723

preg_match() expects parameter 2 to be string, object given

Details

Submitted2004-11-09 14:18 UTC
Fromgregor dot wollner at it-austria dot com
StatusBogus
PackageNet_DNS
PHP Version5.0.2
OSRedhat Linux
Roadmaps(Not assigned)

Comments

[2004-11-09 14:18 UTC] gregor dot wollner at it-austria dot com

Description:
------------
Resolver.php

get_class($packetORname) returns 'Net_DNS_Packet'.

Reproduce code:
---------------
*** Resolver_orig.php Tue Nov 9 15:12:52 2004
--- Resolver.php Tue Nov 9 15:12:03 2004
***************
*** 1017,1021 ****
function make_query_packet($packetORname, $type = '', $class = '')
{
! if (is_object($packetORname) && get_class($packetORname) == 'net_dns_packet'){
$packet = $packetORname;
} else {
--- 1017,1021 ----
function make_query_packet($packetORname, $type = '', $class = '')
{
! if (is_object($packetORname) && get_class($packetORname) == 'Net_DNS_Packet'){
$packet = $packetORname;
} else {

Actual result:
--------------
preg_match() expects parameter 2 to be string, object given in /../lib/php/Net/DNS/Resolver.php on line 1034