From: Kunal Mehta Date: Sun, 27 May 2018 06:39:07 +0000 (-0700) Subject: Hooks: remove some unnecessary code X-Git-Tag: 1.34.0-rc.0~5281^2 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=3bf222c70380f47c981f34dbcc50074116bbc320;p=lhc%2Fweb%2Fwiklou.git Hooks: remove some unnecessary code PHP automatically creates the array when you try to append an item to it. Really. Change-Id: I73b1efe749a9311feeb0d14e1c76b5bbbc0265bd --- diff --git a/includes/Hooks.php b/includes/Hooks.php index 3a33c2d29f..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; }