mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-11-15 02:03:58 +00:00
Merge "Ignore blank lines (previously caused a warning)"
This commit is contained in:
commit
bbb0a08e14
|
@ -464,6 +464,10 @@ class TitleBlacklistEntry {
|
|||
// Strip comments
|
||||
$line = preg_replace( "/^\\s*([^#]*)\\s*((.*)?)$/", "\\1", $line );
|
||||
$line = trim( $line );
|
||||
// A blank string causes problems later on
|
||||
if ( $line === '' ) {
|
||||
return null;
|
||||
}
|
||||
// Parse the rest of message
|
||||
$pockets = [];
|
||||
if ( !preg_match( '/^(.*?)(\s*<([^<>]*)>)?$/', $line, $pockets ) ) {
|
||||
|
|
Loading…
Reference in a new issue