#22952 [Opn->Bgs]: Net_Whois: Call to a member function on a non-object in

From: Date: Sun, 30 Mar 2003 02:13:16 +0000
Subject: #22952 [Opn->Bgs]: Net_Whois: Call to a member function on a non-object in
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-14725@lists.php.net to get a copy of this message
ID: 22952 Updated by: pollita@php.net Reported By: x4com at web dot de -Status: Open +Status: Bogus Bug Type: PEAR related Operating System: Debian Linux/GNU 3.0r1 PHP Version: 4.3.0 New Comment: The Net_Whois query method uses $this to refer to the instantiated object. Since you're attempting to call the method statically there is no instantiation to reference and hence the parses sees: $whoisData = NULL->_connect($whoisServer, $domain); which obviously makes no sense. Instantiate the class, then call the method via your newly created object. Previous Comments: ------------------------------------------------------------------------ [2003-03-29 09:48:19] x4com at web dot de Hello, I get this error with Net_Whois 1.0.1: Fatal error: Call to a member function on a non-object in [..]/Whois.php on line 131 My Script is this: <?php require_once "./Whois.php"; $server = "whois.denic.de"; $query = "phpcrawler.de"; $data = Net_Whois::query($server,$query); echo $data; ?> My PHP Version is 4.2.2 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22952&edit=1

« previous php.pear.dev (#14725) next »