context: Support setting title to null
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 7 Mar 2016 23:29:20 +0000 (23:29 +0000)
committerTimo Tijhof <krinklemail@gmail.com>
Mon, 7 Mar 2016 23:29:20 +0000 (23:29 +0000)
commit92ce715a55ab6998f916cbe9792af9fdb7d27fd9
tree1c3efb27ae2f10c52f56048ea85bc230520c0c69
parentadaf3d221fba17d7fe9dc71ca73800a5f144adaa
context: Support setting title to null

We have various entry points without a title set:

* load.php: Setup.php defaults $wgTitle to null. When messages
  are parsed, MessageCache::parse() will emit a warning and uses
  $wgTitle which is then casted to Special:Badtitle.

* Parser tests: Work all with context now (or parser options)
  without ever setting $wgTitle. However, in order to allow SpecialPageFactory
  to getTitle() and then setTitle() the same value from context, context needs
  to support setting null as title, the same way it can get null as title.

Change-Id: I770f449fe67beedc3f7d4009ed2208e9dde4491c
includes/context/RequestContext.php