Permalink
Browse files

- bugfix for Bug #889

git-svn-id: http://svn.php.net/repository/pear/packages/Net_IPv4/trunk@201025 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent b865917 commit 955a3f6c23ac08696cb65a73671f18f92b37d606 @bate bate committed Nov 22, 2005
Showing with 3 additions and 3 deletions.
  1. +3 −3 IPv4.php
View
@@ -301,13 +301,13 @@ function getSubnet($ip, $netmask) {
}
function inSameSubnet($ip1, $ip2) {
- if (! is_object($ip1) || strtolower(get_class($ip1)) != "net_ipv4") {
+ if (! is_object($ip1) || strcasecmp(get_class($ip1), 'net_ipv4') <> 0) {
$ipobj1 = Net_IPv4::parseAddress($ip1);
if (PEAR::isError($ipobj)) {
return(PEAR::raiseError("IP addresses must be an understood format or a Net_IPv4 object"));
}
}
- if (! is_object($ip2) || strtolower(get_class($ip2)) != "net_ipv4") {
+ if (! is_object($ip2) || strcasecmp(get_class($ip2), 'net_ipv4') <> 0) {
$ipobj2 = Net_IPv4::parseAddress($ip2);
if (PEAR::isError($ipobj)) {
return(PEAR::raiseError("IP addresses must be an understood format or a Net_IPv4 object"));
@@ -369,7 +369,7 @@ function ip2double($ip)
*/
function ipInNetwork($ip, $network)
{
- if (! is_object($network) || get_class($network) != 'net_ipv4') {
+ if (! is_object($network) || strcasecmp(get_class($network), 'net_ipv4') <> 0) {
$network = Net_IPv4::parseAddress($network);
}

0 comments on commit 955a3f6

Please sign in to comment.