From 1ef6deed0062415dff5671d0a43a396599d1028b Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Wed, 10 Jul 2019 13:30:03 -0400 Subject: [PATCH] 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 --- includes/Linker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); -- 2.20.1