Skip to content

Commit 7c2a22c

Browse files
committed
Fix issue where "NO NO" is shown on IPv6 requests
1 parent ac9a6ec commit 7c2a22c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/IP.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static function checkCIDRv6($ip, $cidr) {
5959
$ip_net_bits = substr($binaryip, 0, $maskbits);
6060
$net_bits = substr($binarynet, 0, $maskbits);
6161

62-
if ($ip_net_bits !== $net_bits) echo "NO\n"; else echo "YES\n";
62+
return ($ip_net_bits === $net_bits);
6363
}
6464

6565
private static function inet_to_bits($inet) {

0 commit comments

Comments
 (0)