notifications: prevent log spam when invalid user object listed.

Bug: T308967
Change-Id: I20bfb3c5b725405aaeb48f17d300a06428084cfe
This commit is contained in:
RhinosF1 2022-05-22 10:49:47 +00:00
parent 384074a32a
commit 12a3c76c9e

View file

@ -301,9 +301,10 @@ class EmailNotification {
continue;
}
$user = User::newFromName( $name );
$this->compose( $user, self::ALL_CHANGES, $messageCache );
if ( $user instanceof User ) {
$this->compose( $user, self::ALL_CHANGES, $messageCache );
}
}
$this->sendMails();
}