r47303 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47302‎ | r47303 | r47304 >
Date:22:28, 15 February 2009
Author:aaron
Status:ok
Tags:
Comment:
fix silly bug
Modified paths:
  • /trunk/extensions/CheckUser/checkuser.js (modified) (history)

Diff [purge]

Index: trunk/extensions/CheckUser/checkuser.js
@@ -98,7 +98,8 @@
9999 // Convert the IP to binary form: IPv6
100100 } else if( ipV6 ) {
101101 var ip = ipV6[2];
102 - var cidr = ipV6[0].match( /\/\d+$/ )[0];
 102+ var cidr = ipV6[0].match( /\/\d+$/ );
 103+ cidr = cidr ? cidr[0] : false;
103104 var abbrevs = ip.match( /::/g );
104105 if( abbrevs && abbrevs.length > 1 ) continue; // bad IP!
105106 // Expand out "::"s

Status & tagging log