Throw a FatalError exception instead of calling OutputPage::showFatalError() (on...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 9 Nov 2011 10:59:17 +0000 (10:59 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 9 Nov 2011 10:59:17 +0000 (10:59 +0000)
includes/Hooks.php

index dd08d03..bfec82e 100644 (file)
@@ -222,9 +222,7 @@ class Hooks {
 
                        /* String return is an error; false return means stop processing. */
                        if ( is_string( $retval ) ) {
-                               global $wgOut;
-                               $wgOut->showFatalError( $retval );
-                               return false;
+                               throw new FatalError( $retval );
                        } elseif( $retval === null ) {
                                if ( $closure ) {
                                        $prettyFunc = "$event closure";