From: Brion Vibber Date: Fri, 20 Jul 2007 15:15:09 +0000 (+0000) Subject: pretty up the hook error message with an explanation of what it should do instead X-Git-Tag: 1.31.0-rc.0~52001 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=bbdd0f8d0acdb237c57376039458d3001bdf2963;p=lhc%2Fweb%2Fwiklou.git pretty up the hook error message with an explanation of what it should do instead --- diff --git a/includes/Hooks.php b/includes/Hooks.php index cdbd742b11..20103db406 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -130,7 +130,9 @@ function wfRunHooks($event, $args = null) { } else { $prettyFunc = strval( $callback ); } - throw new MWException( "Invalid NULL return from broken hook $prettyFunc" ); + 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; }