Fix check for your own talk page on subpages

Bug: T279604
Change-Id: I955a602ffb39f2443de9a3b165d8105ea3762058
This commit is contained in:
Bartosz Dziewoński 2021-04-08 01:22:23 +02:00
parent a555db7892
commit 3e319251f0

View file

@ -220,9 +220,9 @@ class HookUtils {
// Topic subscription is not available on your own talk page, as you will
// get 'mention-user-talk' notifications already. (T276996)
if ( $feature === self::TOPICSUBSCRIPTION && $title->getNamespace() === NS_USER_TALK ) {
if ( $feature === self::TOPICSUBSCRIPTION && $title->getNamespace() === NS_USER_TALK && !$title->isSubpage() ) {
$user = User::newFromName( $title->getText() );
if ( $user->equals( $output->getUser() ) ) {
if ( $user && $user->equals( $output->getUser() ) ) {
return false;
}
}