Show title on the page named '0'

The string '0' evals to false in the if( $pageTitle ) condition, hence
the title was not shown for the page named '0'.

Bug: T163084
Change-Id: I27ab379bf67634c484c4cf5e12e391d69702f464
This commit is contained in:
Eddie Greiner-Petter 2017-07-30 19:45:20 +02:00
parent d746b6d970
commit b0384c4314
1 changed files with 2 additions and 1 deletions

View File

@ -797,7 +797,8 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
$heading = $this->getUserPageHelper()->getPageUser()->getName();
} else {
$pageTitle = $this->getOutput()->getPageTitle();
if ( $pageTitle ) {
// Loose comparison with '!=' is intentional, to catch null and false too, but not '0'
if ( $pageTitle != '' ) {
$heading = $pageTitle;
}
}