Forgetting to give a 'true' return value is a very common error which tends
to cause hard-to-track-down interactions between extensions.
* (bug 9328) Use "revision-info-current" message in place of "revision-info"
when viewing the current revision of a page, if available
* (bug 8890) Enable wiki text for "license" message
+* Throw a showstopper exception when a hook function fails to return a value.
+ Forgetting to give a 'true' return value is a very common error which tends
+ to cause hard-to-track-down interactions between extensions.
== Bugfixes since 1.10 ==
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[1] );
+ }
+ $prettyFunc = $prettyClass . '::' . strval( $callback[1] );
+ } else {
+ $prettyFunc = strval( $callback );
+ }
+ throw new MWException( "Invalid NULL return from broken hook $prettyFunc" );
} else if (!$retval) {
return false;
}