X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FHooks.php;h=d434120012cd4aad359952e1bd83e0d60cabb086;hp=c22dc97f460e5da3b7623c497ddd7349d21a461f;hb=d503ac7c9433a36358b1db27c6365167ea869832;hpb=3df3b575c6617df64ec98533cc7141bd2314e274 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' ) ) {