Skip to content

Commit

Permalink
Continued rounding errors, ref #987
Browse files Browse the repository at this point in the history
  • Loading branch information
kcppdevelopers committed Feb 1, 2018
1 parent 11bf481 commit d3fbfba
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions angelleye-includes/angelleye-utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -1946,9 +1946,11 @@ public static function get_user_ip() {
}
$ipv4_pattern = '/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/';
if ( ! preg_match( $ipv4_pattern, $ip_address ) && filter_var($ip_address, FILTER_VALIDATE_IP,FILTER_FLAG_IPV6) ) {
return $ip_address = '';
} else {
return $ip_address;
$ip_address = '';
}
$ip_address = '2001:0db8:85a3:0000:0000:8a2e:0370:7334';
if(strlen($ip_address) > 16) {
$ip_address = '';
}

return $ip_address;
Expand Down

0 comments on commit d3fbfba

Please sign in to comment.