diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2007-09-14 13:18:58 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2007-09-14 13:18:58 +0200 |
commit | 8f416baead93a48e5799e44b8bd2e2c4859f4e04 (patch) | |
tree | cd47ac55eb80a39e3225e8b4f3161b88ea16c2cf /includes/Hooks.php | |
parent | d7d08bd1a17618c7d77a6b9b2989e9f7293d6ed6 (diff) |
auf Version 1.11 aktualisiert; Login-Bug behoben
Diffstat (limited to 'includes/Hooks.php')
-rw-r--r-- | includes/Hooks.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/includes/Hooks.php b/includes/Hooks.php index b428b08d..20103db4 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -119,6 +119,20 @@ function wfRunHooks($event, $args = null) { global $wgOut; $wgOut->showFatalError($retval); return false; + } elseif( $retval === null ) { + if( is_array( $callback ) ) { + if( is_object( $callback[0] ) ) { + $prettyClass = get_class( $callback[0] ); + } else { + $prettyClass = strval( $callback[0] ); + } + $prettyFunc = $prettyClass . '::' . strval( $callback[1] ); + } else { + $prettyFunc = strval( $callback ); + } + throw new MWException( "Detected bug in an extension! " . + "Hook $prettyFunc failed to return a value; " . + "should return true to continue hook processing or false to abort." ); } else if (!$retval) { return false; } @@ -126,4 +140,4 @@ function wfRunHooks($event, $args = null) { return true; } -?> + |