From: Brad Jorsch Date: Tue, 3 Jan 2017 19:55:12 +0000 (-0500) Subject: Cleanup after Iba0138a6 X-Git-Tag: 1.31.0-rc.0~4411^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=commitdiff_plain;h=9d3d29177b2e924b717f9de3a28476b689b10f60;p=lhc%2Fweb%2Fwiklou.git Cleanup after Iba0138a6 Iba0138a6 removed the custom error handler in Hooks::run(), but didn't remove the comment describing it and left behind an unused variable. Change-Id: I9b043fa8bd79625e63d35f95f2fa3ac1b214275c --- diff --git a/includes/Hooks.php b/includes/Hooks.php index 511781dbbd..f4f86be68b 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -176,22 +176,13 @@ class Hooks { throw new MWException( 'Invalid callback ' . $func . ' in hooks for ' . $event . "\n" ); } - /* - * Call the hook. The documentation of call_user_func_array says - * false is returned on failure. However, if the function signature - * does not match the call signature, PHP will issue an warning and - * return null instead. The following code catches that warning and - * provides better error message. - */ - $retval = null; - $badhookmsg = null; - $hook_args = array_merge( $hook, $args ); - // mark hook as deprecated, if deprecation version is specified if ( $deprecatedVersion !== null ) { wfDeprecated( "$event hook (used in $func)", $deprecatedVersion ); } + // Call the hook. + $hook_args = array_merge( $hook, $args ); $retval = call_user_func_array( $callback, $hook_args ); // Process the return value.