Use isset() to check array element exists rather than relying on @ operator

Change-Id: I0ecdcdd1426b2e76a326bc50b6ea0ca1cbad3d22
This commit is contained in:
Ori Livneh 2015-10-21 16:52:14 -07:00 committed by Ori.livneh
parent d80a737921
commit f3472dfdd0

View file

@ -134,7 +134,7 @@ class AbuseFilterTokenizer {
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