Ori.livneh has submitted this change and it was merged.
Change subject: Use isset() to check array element exists rather than relying
on @ operator
......................................................................
Use isset() to check array element exists rather than relying on @ operator
Change-Id: I0ecdcdd1426b2e76a326bc50b6ea0ca1cbad3d22
---
M AbuseFilterTokenizer.php
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Ori.livneh: Verified; Looks good to me, approved
diff --git a/AbuseFilterTokenizer.php b/AbuseFilterTokenizer.php
index 465d418..728c851 100644
--- a/AbuseFilterTokenizer.php
+++ b/AbuseFilterTokenizer.php
@@ -134,7 +134,7 @@
if ( preg_match( self::RADIX_RE, $code, $matches, 0, $offset )
) {
$token = $matches[0];
$input = $matches[1];
- $baseChar = @$matches[2];
+ $baseChar = isset( $matches[2] ) ? $matches[2] : null;
// Sometimes the base char gets mixed in with the rest
of it because
// the regex targets hex, too.
// This mostly happens with binary
--
To view, visit https://gerrit.wikimedia.org/r/247943
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0ecdcdd1426b2e76a326bc50b6ea0ca1cbad3d22
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: wmf/1.27.0-wmf.3
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Se4598 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits