From 337698551eaca95d7ba4f388126c7902bcc46874 Mon Sep 17 00:00:00 2001 From: Stephan Gambke Date: Thu, 9 Oct 2014 15:56:31 +0200 Subject: [PATCH] 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 --- includes/Hooks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" ); } /* -- 2.20.1