jenkins-bot has submitted this change and it was merged.
Change subject: Minor bugfix to IP::prettifyIP.
......................................................................
Minor bugfix to IP::prettifyIP.
The offset returned by preg_match with the PREG_OFFSET_CAPTURE is an
absolute position in the string. You shouldn't *add* it to the
current position in order to advance past the match.
Change-Id: I3631c34e02d9b830bf841bf960855626fbc88eb0
---
M includes/IP.php
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Parent5446: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/IP.php b/includes/IP.php
index 2051e69..fc76310 100644
--- a/includes/IP.php
+++ b/includes/IP.php
@@ -212,7 +212,7 @@
$longest = $match;
$longestPos = $pos;
}
- $offset += ( $pos + strlen( $match ) ); //
advance
+ $offset = ( $pos + strlen( $match ) ); //
advance
}
if ( $longest !== false ) {
// Replace this portion of the string with the
'::' abbreviation
--
To view, visit https://gerrit.wikimedia.org/r/84002
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3631c34e02d9b830bf841bf960855626fbc88eb0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits