From 7dc30f7aea6cd84a42a4e162d4b2409b02c67df6 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 10 Apr 2010 23:52:07 +0000 Subject: [PATCH] Fix for issue noted on CR r64876: fatal error on CSS/JS subpage display --- includes/Article.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index da17936faf..3211e6f9b4 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -848,6 +848,7 @@ class Article { # Keep going until $outputDone is set, or we run out of things to do. $pass = 0; $outputDone = false; + $this->mParserOutput = false; while ( !$outputDone && ++$pass ) { switch( $pass ) { case 1: @@ -957,9 +958,11 @@ class Article { } # Adjust the title if it was set by displaytitle, -{T|}- or language conversion - $titleText = $this->mParserOutput->getTitleText(); - if ( strval( $titleText ) !== '' ) { - $wgOut->setPageTitle( $titleText ); + if ( $this->mParserOutput ) { + $titleText = $this->mParserOutput->getTitleText(); + if ( strval( $titleText ) !== '' ) { + $wgOut->setPageTitle( $titleText ); + } } # Now that we've filled $this->mParserOutput, we know whether -- 2.20.1