mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 07:54:13 +00:00
UnreadWikis: Check the actual object we're about to call a method on
In principle, if $alertCount > 0, $alertTime should never be null, but it feels much safer to check $alertTime itself instead. Change-Id: Ifb107e257fbcd65e8181e2a214028f1b3733ac30
This commit is contained in:
parent
e29d1253b3
commit
544129492d
|
@ -115,11 +115,11 @@ class EchoUnreadWikis {
|
|||
if ( $alertCount || $msgCount ) {
|
||||
$values = [
|
||||
'euw_alerts' => $alertCount,
|
||||
'euw_alerts_ts' => $alertCount
|
||||
'euw_alerts_ts' => $alertTime
|
||||
? $alertTime->getTimestamp( TS_MW )
|
||||
: static::DEFAULT_TS,
|
||||
'euw_messages' => $msgCount,
|
||||
'euw_messages_ts' => $msgCount
|
||||
'euw_messages_ts' => $msgTime
|
||||
? $msgTime->getTimestamp( TS_MW )
|
||||
: static::DEFAULT_TS,
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue