jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/389790 )

Change subject: Do not try to add edit links to the HTML in contexts without a 
Title
......................................................................


Do not try to add edit links to the HTML in contexts without a Title

Title may be null when accessed via this->getTitle()
If this is the case we should assume the skin is being used by someone
who is not a reader and in these circumstances, not try to render any
page actions.

Bug: T179833
Change-Id: Ia47fd9b059101bf22b5d31be7df3a332b35d6b24
---
M includes/skins/SkinMinerva.php
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Jdlrobson: Looks good to me, approved



diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index d4aef10..344bc06 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -194,6 +194,10 @@
        protected function isAllowedPageAction( $action ) {
                $title = $this->getTitle();
                $config = $this->getConfig();
+               // Title may be undefined in certain contexts (T179833)
+               if ( !$title ) {
+                       return false;
+               }
 
                if (
                        ! in_array( $action, $config->get( 'MinervaPageActions' 
) )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia47fd9b059101bf22b5d31be7df3a332b35d6b24
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: GergÅ‘ Tisza <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Pmiazga <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to