Handle null user when trying to generate a link for notifications

Bug: T127728
Change-Id: I87de2d10887216e3edf53c2972b6bf230191f0ea
This commit is contained in:
Stephane Bisson 2016-02-24 11:42:03 -05:00
parent 37b3f4df8b
commit f1e68f9451

View file

@ -381,10 +381,14 @@ abstract class EchoEventPresentationModel implements JsonSerializable {
}
/**
* @param User $user
* @param User|null $user
* @return array|null
*/
final protected function getUserLink( User $user ) {
final protected function getUserLink( $user ) {
if ( !$user ) {
return null;
}
if ( !$this->userCan( Revision::DELETED_USER ) ) {
return null;
}