X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FHooks.php;h=d434120012cd4aad359952e1bd83e0d60cabb086;hb=96fa73b3cf7b697942826e4aeaa2778e74ebcc02;hp=c22dc97f460e5da3b7623c497ddd7349d21a461f;hpb=52ba4e60846b7c47d7b460beee82654346c41093;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Hooks.php b/includes/Hooks.php index c22dc97f46..d434120012 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -47,10 +47,6 @@ class Hooks { * @since 1.18 */ public static function register( $name, $callback ) { - if ( !isset( self::$handlers[$name] ) ) { - self::$handlers[$name] = []; - } - self::$handlers[$name][] = $callback; } @@ -62,6 +58,7 @@ class Hooks { * * @since 1.21 * @throws MWException If not in testing mode. + * @codeCoverageIgnore */ public static function clear( $name ) { if ( !defined( 'MW_PHPUNIT_TEST' ) && !defined( 'MW_PARSER_TEST' ) ) {