mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-11-23 21:53:40 +00:00
Guard against method call on null
Repeat the same check as in ::isBlacklisted() without the comment Bug: T376584 Change-Id: I45adc3a5e4c8330e8120db1afb585ca4f77c99cd
This commit is contained in:
parent
4382b2f8e1
commit
feafa06dd0
|
@ -253,6 +253,9 @@ class TitleBlacklist {
|
|||
public function isWhitelisted( $title, $action = 'edit' ) {
|
||||
if ( !( $title instanceof Title ) ) {
|
||||
$title = Title::newFromText( $title );
|
||||
if ( !$title ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$whitelist = $this->getWhitelist();
|
||||
foreach ( $whitelist as $item ) {
|
||||
|
|
Loading…
Reference in a new issue