mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-11 16:28:21 +00:00
Fix adding a domain when the page doesn't exist
It should fail on null but it should create the page if it doesn't exist or doesn't have any content yet. This is breaking the special page, see: [[de:234828092#New_special_page_to_fight_spam_//_Neue_Spezialseite_zur_Spam-Bekämpfung]] Change-Id: I9166c2bdcfacb4b19706d246fbf99b2f24ca4cc6
This commit is contained in:
parent
4f65b2cb97
commit
1f7090ebac
|
@ -206,7 +206,7 @@ class BlockedDomainStorage implements IDBAccessObject {
|
|||
*/
|
||||
public function addDomain( string $domain, string $notes, $user ): ?RevisionRecord {
|
||||
$content = $this->loadConfigContent();
|
||||
if ( !$content ) {
|
||||
if ( $content === null ) {
|
||||
return null;
|
||||
}
|
||||
$content[] = [ 'domain' => $domain, 'notes' => $notes ];
|
||||
|
|
Loading…
Reference in a new issue