From fb71ab10cbd887439ff50c03bb22d67f0e88e3b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20Tisza?= Date: Thu, 19 Sep 2024 16:03:18 +0000 Subject: [PATCH] DiscussionParser: Do not create User objects from subpages Bug: T375212 Change-Id: Id409a4f9adcda840400e529db72eb696ec55b3f4 --- includes/DiscussionParser.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php index febc82acc..a6a440df7 100644 --- a/includes/DiscussionParser.php +++ b/includes/DiscussionParser.php @@ -1088,8 +1088,9 @@ abstract class DiscussionParser { // figure out if the link is related to a user if ( - $title && - ( $title->getNamespace() === NS_USER || $title->getNamespace() === NS_USER_TALK ) + $title + && ( $title->getNamespace() === NS_USER || $title->getNamespace() === NS_USER_TALK ) + && !$title->isSubpage() ) { $usernames[] = $title->getText(); } elseif ( $title && $title->isSpecial( 'Contributions' ) ) {