aboutsummaryrefslogtreecommitdiffstats
path: root/includes/Hooks.php
diff options
context:
space:
mode:
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>2011-11-09 10:59:17 +0000
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>2011-11-09 10:59:17 +0000
commit4aa1b32903ad02338c39018314af9240545aaaad (patch)
tree1d79e9076ea56f9e44bdbf6c06f863e8ed03122d /includes/Hooks.php
parentd3c0084895b682dab53040d4eb29303754bc49d1 (diff)
downloadmediawikicore-4aa1b32903ad02338c39018314af9240545aaaad.tar.gz
mediawikicore-4aa1b32903ad02338c39018314af9240545aaaad.zip
Throw a FatalError exception instead of calling OutputPage::showFatalError() (on usage of $wgOut less)
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/102505
Diffstat (limited to 'includes/Hooks.php')
-rw-r--r--includes/Hooks.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/includes/Hooks.php b/includes/Hooks.php
index dd08d03bf563..bfec82e98496 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";