jenkins-bot has submitted this change and it was merged.

Change subject: context: Support setting title to null
......................................................................


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
---
M includes/context/RequestContext.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Gilles: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/context/RequestContext.php 
b/includes/context/RequestContext.php
index 35ee1b7..c8b8108 100644
--- a/includes/context/RequestContext.php
+++ b/includes/context/RequestContext.php
@@ -167,7 +167,7 @@
         *
         * @param Title $title
         */
-       public function setTitle( Title $title ) {
+       public function setTitle( Title $title = null ) {
                $this->title = $title;
                // Erase the WikiPage so a new one with the new title gets 
created.
                $this->wikipage = null;

-- 
To view, visit https://gerrit.wikimedia.org/r/275714
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I770f449fe67beedc3f7d4009ed2208e9dde4491c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to