mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-27 17:20:40 +00:00
Merge "Don't make unchecked method call on object that might be null"
This commit is contained in:
commit
d891751f11
|
@ -1626,11 +1626,12 @@ class EchoHooks {
|
|||
public static function onSpecialMuteModifyFormFields( SpecialMute $specialMute, &$fields ) {
|
||||
$echoPerUserBlacklist = MediaWikiServices::getInstance()->getMainConfig()->get( 'EchoPerUserBlacklist' );
|
||||
if ( $echoPerUserBlacklist ) {
|
||||
$target = $specialMute->getTarget();
|
||||
$fields[ 'echo-notifications-blacklist'] = [
|
||||
'type' => 'check',
|
||||
'label-message' => [
|
||||
'echo-specialmute-label-mute-notifications',
|
||||
$specialMute->getTarget()->getName()
|
||||
$target ? $target->getName() : ''
|
||||
],
|
||||
'default' => $specialMute->isTargetBlacklisted( 'echo-notifications-blacklist' ),
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue