dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "worthwhile tests in testTitleObjectStringConversion"
[lhc/web/wiklou.git]
/
includes
/
IP.php
diff --git
a/includes/IP.php
b/includes/IP.php
index
1828249
..
1b40f4b
100644
(file)
--- a/
includes/IP.php
+++ b/
includes/IP.php
@@
-18,7
+18,7
@@
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* http://www.gnu.org/copyleft/gpl.html
*
* @file
- * @author Antoine Musso
<hashar at free dot fr>
, Aaron Schulz
+ * @author Antoine Musso
"<hashar at free dot fr>"
, Aaron Schulz
*/
// Some regex definition to "play" with IP address and IP address blocks
*/
// Some regex definition to "play" with IP address and IP address blocks
@@
-714,6
+714,7
@@
class IP {
* @return String: valid dotted quad IPv4 address or null
*/
public static function canonicalize( $addr ) {
* @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;
}
if ( self::isValid( $addr ) ) {
return $addr;
}