mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 23:40:19 +00:00
Merge "Avoid Call Stack warning when there is an error in the regex pattern"
This commit is contained in:
commit
b7b04cb830
|
@ -231,7 +231,9 @@ class AFPData {
|
|||
$pattern .= 'i';
|
||||
}
|
||||
|
||||
MediaWiki\suppressWarnings();
|
||||
$result = preg_match( $pattern, $str );
|
||||
MediaWiki\restoreWarnings();
|
||||
if ( $result === false ) {
|
||||
throw new AFPUserVisibleException(
|
||||
'regexfailure',
|
||||
|
|
Loading…
Reference in a new issue