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
This commit is contained in:
parent
9fa40f81d8
commit
e422eb9a81
|
@ -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' ) )
|
||||
|
|
Loading…
Reference in New Issue