pretty up the hook error message with an explanation of what it should do instead
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 20 Jul 2007 15:15:09 +0000 (15:15 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 20 Jul 2007 15:15:09 +0000 (15:15 +0000)
includes/Hooks.php

index cdbd742..20103db 100644 (file)
@@ -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;
                }