sparc / phpWhois.org

Original phpWhois soruces
http://www.phpwhois.org
GNU General Public License v2.0
95 stars 43 forks source link

PHP Warning: Illegal string offset 'disclaimer' in /root/phpWhois.org/src/whois.parser.php on line 350 #2

Closed daquaris closed 5 years ago

daquaris commented 6 years ago

Main error:

PHP Warning: Illegal string offset 'disclaimer' in /root/phpWhois.org/src/whois.parser.php on line 350 PHP Fatal error: Uncaught Error: Cannot use string offset as an array in /root/phpWhois.org/src/whois.parser.php:350 Stack trace:

0 /root/phpWhois.org/src/whois.ip.arin.php(70): generic_parser_b(Array, Array, 'ymd', false, true)

1 /root/phpWhois.org/src/whois.client.php(469): arin_handler->parse(Array, 'AS13335')

2 /root/phpWhois.org/src/whois.ip.php(185): WhoisClient->Process(Array)

3 /root/phpWhois.org/src/whois.ip.php(130): ip_handler->parse_results(Array, Array, 'AS13335', true)

4 /root/phpWhois.org/src/whois.client.php(469): ip_handler->parse(Array, 'AS13335')

5 /root/phpWhois.org/src/whois.client.php(254): WhoisClient->Process(Array, true)

6 /root/phpWhois.org/src/whois.main.php(164): WhoisClient->GetData('AS13335', true)

7 /root/parsegeo.php(11): Whois->Lookup('AS13335', false)

8 {main}

thrown in /root/phpWhois.org/src/whois.parser.php on line 350

Changing line 341 in src/whois.parser.php from:

$r = '';

to:

$r = array();

Fixes the issue.

sparc commented 6 years ago

I cannot reproduce it, which PHP version are you using ?

daquaris commented 6 years ago

PHP 7.2.4-1+b1 (cli) (built: May 12 2018 13:03:02) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.4-1+b1, Copyright (c) 1999-2018, by Zend Technologies