sparc / phpWhois.org

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

Type error with IP Lookup for latin america #27

Open offsky opened 1 year ago

offsky commented 1 year ago

I was trying to do a reverse IP lookup on "200.16.89.104" which happens to be a site in Argentine (buenosaires.gob.ar). This library was giving me an error in whois.ip.lacnic.php on line 72. A string was being passed to array_unique.

Here is how I fixed it.

if(is_string($r['network']['nserver'])) $r['network']['nserver'] = array($r['network']['nserver']);
else if(is_array($r['network']['nserver'])) $r['network']['nserver'] = array_unique($r['network']['nserver']);

Sorry, dont have time for a pull request right now, so I'll leave this here for now. If I get a chance I'll come back.