r83311 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83310‎ | r83311 | r83312 >
Date:19:17, 5 March 2011
Author:ialex
Status:resolved (Comments)
Tags:
Comment:
Follow-up r83304: don't crash if Article::getParserOutput() returns false
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/View.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/View.php
@@ -1232,6 +1232,10 @@
12331233
12341234 $parserOutput = $post->getParserOutput( $oldid );
12351235
 1236+ if ( $parserOutput === false ) {
 1237+ return '';
 1238+ }
 1239+
12361240 // Remove title, so that it stays set correctly.
12371241 $parserOutput->setTitleText( '' );
12381242

Follow-up revisions

RevisionCommit summaryAuthorDate
r83386Fix for r83311: follow documentationialex16:36, 6 March 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83304Follow-up r83240: seems people prefer returning false than the current versio...ialex17:55, 5 March 2011

Comments

#Comment by Platonides (talk | contribs)   14:34, 6 March 2011

The function doc says "return False if the article and revision do not exist".

#Comment by IAlex (talk | contribs)   16:37, 6 March 2011

Done in r83386.

Status & tagging log