From: Stephan Gambke Date: Thu, 9 Oct 2014 13:56:31 +0000 (+0200) Subject: Add name of offensive hook function to error message X-Git-Tag: 1.31.0-rc.0~13642 X-Git-Url: http://git.cyclocoop.org/data/File:Image2.gif?a=commitdiff_plain;h=337698551eaca95d7ba4f388126c7902bcc46874;p=lhc%2Fweb%2Fwiklou.git Add name of offensive hook function to error message 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 --- diff --git a/includes/Hooks.php b/includes/Hooks.php index 29287483bf..668c3d9ec1 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -179,7 +179,7 @@ class Hooks { // 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" ); } /*