Merge "Handle null user when trying to generate a link for notifications"

This commit is contained in:
jenkins-bot 2016-02-24 21:29:25 +00:00 committed by Gerrit Code Review
commit 656d6c401c

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;
}