Fix regex error handling by returning immediately if error reporting is disabled.

This commit is contained in:
Andrew Garrett 2009-06-17 11:38:31 +00:00
parent 6678b42d8e
commit db3c0bbe05

View file

@ -1587,6 +1587,7 @@ class AbuseFilterParser {
}
public static function regexErrorHandler( $errno, $errstr, $errfile, $errline, $context ) {
if ( error_reporting() == 0 ) { return true; }
throw new AFPUserVisibleException( 'regexfailure', $context['pos'],
array( $errstr, $context['regex'] ) );
return true;