Ensure canHaveTalkPage returns false when getTalkPage would fail.
authordaniel <dkinzler@wikimedia.org>
Mon, 3 Jun 2019 22:56:22 +0000 (00:56 +0200)
committerdaniel <dkinzler@wikimedia.org>
Wed, 3 Jul 2019 08:40:10 +0000 (10:40 +0200)
commitdbce648a15ee7100383c3ec9781775f0f895c645
tree301809d444fbaed3c631e694d5d854b959994205
parentb74df863c8d0ab7873a4fd9453392ff4f7200b47
Ensure canHaveTalkPage returns false when getTalkPage would fail.

This causes Title::getTalkPage and NamespaceInfo::getTitle() to throw
an MWException when called on a LinkTarget that is an interwiki link
or a relative section link. These methods were already throwing
MWException when called on a link to a Special page.

Bug: T224814
Change-Id: I525c186a5b8b8fc22bca195da48afead3bfbd402
includes/Title.php
includes/title/NamespaceInfo.php
tests/phpunit/includes/TitleTest.php
tests/phpunit/includes/parser/CoreParserFunctionsTest.php
tests/phpunit/includes/title/NamespaceInfoTest.php