Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/247937

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/37/247937/1

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/247937
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ecdcdd1426b2e76a326bc50b6ea0ca1cbad3d22
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to