DiscussionParser: Do not create User objects from subpages

Bug: T375212
Change-Id: Id409a4f9adcda840400e529db72eb696ec55b3f4
This commit is contained in:
Gergő Tisza 2024-09-19 16:03:18 +00:00 committed by Kosta Harlan
parent 2eb264770b
commit fb71ab10cb

View file

@ -1088,8 +1088,9 @@ abstract class DiscussionParser {
// figure out if the link is related to a user // figure out if the link is related to a user
if ( if (
$title && $title
( $title->getNamespace() === NS_USER || $title->getNamespace() === NS_USER_TALK ) && ( $title->getNamespace() === NS_USER || $title->getNamespace() === NS_USER_TALK )
&& !$title->isSubpage()
) { ) {
$usernames[] = $title->getText(); $usernames[] = $title->getText();
} elseif ( $title && $title->isSpecial( 'Contributions' ) ) { } elseif ( $title && $title->isSpecial( 'Contributions' ) ) {