r61741 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61740‎ | r61741 | r61742 >
Date:10:04, 31 January 2010
Author:aaron
Status:resolved (Comments)
Tags:
Comment:
Clean up silly bug in load()
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticleView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php
@@ -33,6 +33,7 @@
3434 if ( $this->article == null ) {
3535 throw new MWException( 'FlaggedArticleViewer has no context article!' );
3636 }
 37+ $this->loaded = true;
3738 }
3839 }
3940

Follow-up revisions

RevisionCommit summaryAuthorDate
r62536Follow-up r61741: made load() more resistant to infinite loops if bad code us...aaron18:49, 15 February 2010

Comments

#Comment by Tim Starling (talk | contribs)   07:58, 15 February 2010

You should put it at the top of the function, before the self::globalArticleInstance(), to avoid infinite loop bugs, which are very annoying. They're even more annoying that partially initialised objects. Especially when they happen inside exception handlers.

Status & tagging log