From 4aa1b32903ad02338c39018314af9240545aaaad Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 9 Nov 2011 10:59:17 +0000 Subject: [PATCH] Throw a FatalError exception instead of calling OutputPage::showFatalError() (on usage of $wgOut less) --- includes/Hooks.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/Hooks.php b/includes/Hooks.php index dd08d03bf5..bfec82e984 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -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"; -- 2.20.1