X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FHooks.php;h=d434120012cd4aad359952e1bd83e0d60cabb086;hb=acaa3e31368a040dc9b888386d11c42a355f4c9f;hp=c22dc97f460e5da3b7623c497ddd7349d21a461f;hpb=1b13888ed6bd09731f10045650714a3392bb55df;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' ) ) {