0

Please how can I correct this error:

Warning: Illegal string offset 'handler' in /home/***************/public_html/whois/phpwhois/whois.gtld.php on line 95

on the following code:

function parse($data, $query)
{
$this->Query = array();
$this->SUBVERSION = sprintf("%s-%s", $query["handler"], $this->HANDLER_VERSION);
$this->result = generic_parser_b($data["rawdata"], $this->REG_FIELDS, 'dmy');
NREZ
  • 942
  • 9
  • 13
Ronin
  • 1
  • OK. Please consider this solved. I found the solution on this page: http://stackoverflow.com/questions/15654076/warning-illegal-string-offset-handler-in-c-wamp-www-whois-whois-whois-gtld-p However, if you have something to add to it, I will appreciate. Thank You! – Ronin Jul 31 '13 at 13:10
  • Its an old post. I do looked for the solution so, sharing my finding solution which is already made for this by the phpwhois in github [https://github.com/phpWhois/phpWhois/commit/8d3c57316e7d971de7ccc4a0acf775f12e504b60](https://github.com/phpWhois/phpWhois/commit/8d3c57316e7d971de7ccc4a0acf775f12e504b60) – ilangovan Jul 27 '17 at 08:07

1 Answers1

0

Please check if $query is a string if it is then the code will not work. Make sure you pass $enquiry as an array or fire an exception.

Hazem Mohamed
  • 564
  • 3
  • 7