mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-11-27 23:40:25 +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' ) {
|
public function isWhitelisted( $title, $action = 'edit' ) {
|
||||||
if ( !( $title instanceof Title ) ) {
|
if ( !( $title instanceof Title ) ) {
|
||||||
$title = Title::newFromText( $title );
|
$title = Title::newFromText( $title );
|
||||||
|
if ( !$title ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$whitelist = $this->getWhitelist();
|
$whitelist = $this->getWhitelist();
|
||||||
foreach ( $whitelist as $item ) {
|
foreach ( $whitelist as $item ) {
|
||||||
|
|
Loading…
Reference in a new issue