From: Brian Wolff Date: Thu, 28 Sep 2017 02:36:31 +0000 (+0000) Subject: Fix CreditsAction when user has no real name set but real names enabled X-Git-Tag: 1.31.0-rc.0~1932^2 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=729be8690bc28a32e3f2d9fdb936d6fd1661beb9;p=lhc%2Fweb%2Fwiklou.git Fix CreditsAction when user has no real name set but real names enabled Change-Id: Ief347739a1231fa8bd814694bdb5b4f44ba41a77 --- diff --git a/includes/actions/CreditsAction.php b/includes/actions/CreditsAction.php index 7025477803..ed58686ac5 100644 --- a/includes/actions/CreditsAction.php +++ b/includes/actions/CreditsAction.php @@ -198,6 +198,9 @@ class CreditsAction extends FormlessAction { protected function link( User $user ) { if ( $this->canShowRealUserName() && !$user->isAnon() ) { $real = $user->getRealName(); + if ( $real === '' ) { + $real = $user->getName(); + } } else { $real = $user->getName(); }