the php object option returns a string, not a real php object

giorgio79 - July 11, 2009 - 08:21
Project:Whois lookup
Version:6.x-1.1
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:fixed
Description

Hello,

I notice that when I select php object output, I only get a string, not a real php object, so I cannot access its atomic elements.

Any suggestions, why this is?

$data = whois_get_whois("www.hgf.com");

// these wont work!
print_r ($data->regrinfo->domain);
print('<br>');
print_r ($data["regrinfo"]["domain"]);

#1

giorgio79 - July 11, 2009 - 08:57

to get back a real php array
in whois.module line 208
$data = $result;
replace

          $data .= $utils->showObject($result);

with

  $data = $result;

#2

helmo - December 4, 2009 - 10:12
Status:active» fixed

In the latest CVS version the code has been divided into separate functions, therefore whois_get_whois() now returns the result object.

 
 

Drupal is a registered trademark of Dries Buytaert.