Skip to content

Commit

Permalink
is_valid_ipv6 is now capable to suppressing error message
Browse files Browse the repository at this point in the history
  • Loading branch information
stasic committed Nov 27, 2014
1 parent 5b8967a commit 4dfc943
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion inc/dns.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,10 @@ function is_valid_ipv6($ipv6, $answer = true) {


if(filter_var($ipv6, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) === FALSE) {
error(ERR_DNS_IPV6); return false;
if($answer) {
error(ERR_DNS_IPV6);
}
return false;
}

return true;
Expand Down

0 comments on commit 4dfc943

Please sign in to comment.