From: daniel Date: Wed, 5 Sep 2012 19:11:42 +0000 (+0200) Subject: [Bug 35738] remove zone info from ipv6 addresses X-Git-Tag: 1.31.0-rc.0~22452^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=5439012c36b93685ba381a2fa7963ffa5eb28d92;p=lhc%2Fweb%2Fwiklou.git [Bug 35738] remove zone info from ipv6 addresses Patch provided by Nick Kuznia Change-Id: Icccf10974746e8e27000ab45de28d0f1836ec8aa --- diff --git a/includes/IP.php b/includes/IP.php index 1828249889..10c707e722 100644 --- a/includes/IP.php +++ b/includes/IP.php @@ -714,6 +714,7 @@ class IP { * @return String: valid dotted quad IPv4 address or null */ public static function canonicalize( $addr ) { + $addr = preg_replace( '/\%.*/','', $addr ); // remove zone info (bug 35738) if ( self::isValid( $addr ) ) { return $addr; }