From: Brad Jorsch Date: Wed, 10 Jul 2019 17:30:03 +0000 (-0400) Subject: Linker: Fix incorrect test added in Ib9816d8b X-Git-Tag: 1.34.0-rc.0~1092 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=1ef6deed0062415dff5671d0a43a396599d1028b;p=lhc%2Fweb%2Fwiklou.git Linker: Fix incorrect test added in Ib9816d8b The test was intended to check for whether we have a user ID *or* a user name. Instead, it's checking if we have a user ID *and* a user name. And it also failed to consider User:0. Bug: T227656 Change-Id: Ia1b5c4a6ae028513b73a65cd2c885459327d29c3 --- diff --git a/includes/Linker.php b/includes/Linker.php index f3d492f829..2e0011cf44 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1121,7 +1121,7 @@ class Linker { ) { $userId = $rev->getUser( Revision::FOR_THIS_USER ); $userText = $rev->getUserText( Revision::FOR_THIS_USER ); - if ( $userId && $userText ) { + if ( $userId || (string)$userText !== '' ) { $link = self::userLink( $userId, $userText ) . self::userToolLinks( $userId, $userText, false, 0, null, $useParentheses );