Merge branch '3.2.x'

This commit is contained in:
Marc Alexander 2018-10-20 20:19:15 -04:00
commit ee3d3fbf41
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -1429,21 +1429,14 @@ function user_ipwhois($ip)
return ''; return '';
} }
if (preg_match(get_preg_expression('ipv4'), $ip)) if (!preg_match(get_preg_expression('ipv4'), $ip) && !preg_match(get_preg_expression('ipv6'), $ip))
{
// IPv4 address
$whois_host = 'whois.arin.net.';
}
else if (preg_match(get_preg_expression('ipv6'), $ip))
{
// IPv6 address
$whois_host = 'whois.sixxs.net.';
}
else
{ {
return ''; return '';
} }
// IPv4 & IPv6 addresses
$whois_host = 'whois.arin.net.';
$ipwhois = ''; $ipwhois = '';
if (($fsk = @fsockopen($whois_host, 43))) if (($fsk = @fsockopen($whois_host, 43)))