From 3bf222c70380f47c981f34dbcc50074116bbc320 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sat, 26 May 2018 23:39:07 -0700 Subject: [PATCH] Hooks: remove some unnecessary code PHP automatically creates the array when you try to append an item to it. Really. Change-Id: I73b1efe749a9311feeb0d14e1c76b5bbbc0265bd --- includes/Hooks.php | 4 ---- 1 file changed, 4 deletions(-) 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; } -- 2.20.1