When a hook function is not callable an exception is thrown.
This patch adds the name of the offensive hook function to
the exception message to improve its informative value.
Change-Id: I376d7f5590099620a4c11ff9a4967d6d8f6560cc
// Run autoloader (workaround for call_user_func_array bug)
// and throw error if not callable.
if ( !is_callable( $callback ) ) {
- throw new MWException( 'Invalid callback in hooks for ' . $event . "\n" );
+ throw new MWException( 'Invalid callback ' . $func . ' in hooks for ' . $event . "\n" );
}
/*