summaryrefslogtreecommitdiff
path: root/php-kolab/Kolab_Filter
diff options
context:
space:
mode:
authorSascha Wilde <wilde@intevation.de>2008-04-15 15:29:49 (GMT)
committerSascha Wilde <wilde@intevation.de>2008-04-15 15:29:49 (GMT)
commitabf3b2f5fded345e1d77b6a2fa76dfe69bdbf21d (patch)
tree2afde258a4f72a2efd0e842a46e0587376e21214 /php-kolab/Kolab_Filter
parentbd161235392a228bbc65aa760e93c5092b58e5a9 (diff)
downloadserver-abf3b2f5fded345e1d77b6a2fa76dfe69bdbf21d.tar.gz
Fixed warning in match_ip() for networks defined as simple IPs.
See kolab/issue2466.
Diffstat (limited to 'php-kolab/Kolab_Filter')
-rw-r--r--php-kolab/Kolab_Filter/Filter/Content.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/php-kolab/Kolab_Filter/Filter/Content.php b/php-kolab/Kolab_Filter/Filter/Content.php
index 4b1913e..0fc86b7 100644
--- a/php-kolab/Kolab_Filter/Filter/Content.php
+++ b/php-kolab/Kolab_Filter/Filter/Content.php
@@ -396,7 +396,7 @@ function match_ip($network, $ip)
$iplong = ip2long($ip);
$cidr = explode("/", $network);
$netiplong = ip2long($cidr[0]);
- if ( $cidr[1] ) {
+ if ( count($cidr) == 2 ) {
$iplong = $iplong & ( 0xffffffff << 32 - $cidr[1] );
$netiplong = $netiplong & ( 0xffffffff << 32 - $cidr[1] );
}