r102505 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102504‎ | r102505 | r102506 >
Date:10:59, 9 November 2011
Author:ialex
Status:ok
Tags:
Comment:
Throw a FatalError exception instead of calling OutputPage::showFatalError() (on usage of $wgOut less)
Modified paths:
  • /trunk/phase3/includes/Hooks.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Hooks.php
@@ -222,9 +222,7 @@
223223
224224 /* String return is an error; false return means stop processing. */
225225 if ( is_string( $retval ) ) {
226 - global $wgOut;
227 - $wgOut->showFatalError( $retval );
228 - return false;
 226+ throw new FatalError( $retval );
229227 } elseif( $retval === null ) {
230228 if ( $closure ) {
231229 $prettyFunc = "$event closure";

Status & tagging log