From e422eb9a818fb00f223d47f3acd4dc37d4a9e978 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Tue, 7 Nov 2017 11:57:43 -0800 Subject: [PATCH] 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 --- includes/skins/SkinMinerva.php | 4 ++++ 1 file changed, 4 insertions(+) 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 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin { 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' ) )