TitleParser: In formatTitle(), don't throw exceptions on bad namespaces
authorKunal Mehta <legoktm@member.fsf.org>
Thu, 26 May 2016 20:29:02 +0000 (13:29 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Thu, 26 May 2016 20:34:18 +0000 (13:34 -0700)
commita22ab0eab02c6de1335ded722cf5b712fc79504a
tree806d1ca66d604cb17537558202b1dcf2623cc17a
parent6a4057d3896c1fc39299c43b93e19854a57e17a2
TitleParser: In formatTitle(), don't throw exceptions on bad namespaces

This ocassionally happens for whatever reason, but it doesn't really
make sense to throw an exception when creating a broken-looking link
would also work. We already do this for TitleParser::getPrefixedDBkey(),
and this also matches the behavior of Title::getNsText().

Bug: T136352
Bug: T136356
Change-Id: Ic7eb17f8917f7fbb28b11d94b742dac1fe5582a1
includes/title/MediaWikiTitleCodec.php
tests/phpunit/includes/title/MediaWikiTitleCodecTest.php