From f4dbb31aa18b2be76299220f6f9718c20839a4d2 Mon Sep 17 00:00:00 2001 From: abraar Date: Fri, 10 Dec 2010 14:12:24 +0000 Subject: [PATCH] Replaced eregi() with preg_match() and get_class() for thirdparty --- gulliver/thirdparty/pear/Net/IPv4.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gulliver/thirdparty/pear/Net/IPv4.php b/gulliver/thirdparty/pear/Net/IPv4.php index 68de17e4d..e9195715d 100644 --- a/gulliver/thirdparty/pear/Net/IPv4.php +++ b/gulliver/thirdparty/pear/Net/IPv4.php @@ -212,7 +212,7 @@ class Net_IPv4 /* * a hexadecimal string was entered */ - if (eregi("^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$", $parts[1], $regs)) { + if (preg_match("/([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})/", $parts[1], $regs)) { // hexadecimal string $myself->netmask = hexdec($regs[1]) . "." . hexdec($regs[2]) . "." . hexdec($regs[3]) . "." . hexdec($regs[4]); @@ -394,7 +394,7 @@ class Net_IPv4 */ function htoa($addr) { - if (eregi("^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$", + if (preg_match("/([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})/", $addr, $regs)) { return hexdec($regs[1]) . "." . hexdec($regs[2]) . "." . hexdec($regs[3]) . "." . hexdec($regs[4]);