mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-09-24 02:39:33 +00:00
Avoid warnings on older queued EchoNotificationDeleteJobs
Old jobs were queued with array( $userId => $userId ), so there will be no '0' index. Use array_values() since we don't care about the keys. Change-Id: I1155d310c7fa09c728797d35d63c7cec0383511c
This commit is contained in:
parent
a7c36b0b86
commit
e536eab216
|
@ -46,7 +46,9 @@ class EchoNotificationDeleteJob extends Job {
|
|||
$notifMapper = new EchoNotificationMapper();
|
||||
$targetMapper = new EchoTargetPageMapper();
|
||||
|
||||
$userId = $this->userIds[0];
|
||||
// Back-compat for older jobs which used array( $userId => $userId );
|
||||
$userIds = array_values( $this->userIds );
|
||||
$userId = $userIds[0];
|
||||
$user = User::newFromId( $userId );
|
||||
$notif = $notifMapper->fetchByUserOffset( $user, $wgEchoMaxUpdateCount );
|
||||
if ( $notif ) {
|
||||
|
|
Loading…
Reference in a new issue