dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
cac3ce5
)
Hooks: remove some unnecessary code
author
Kunal Mehta
<legoktm@member.fsf.org>
Sun, 27 May 2018 06:39:07 +0000
(23:39 -0700)
committer
Kunal Mehta
<legoktm@member.fsf.org>
Sun, 27 May 2018 06:39:07 +0000
(23:39 -0700)
PHP automatically creates the array when you try to append an item to
it. Really.
Change-Id: I73b1efe749a9311feeb0d14e1c76b5bbbc0265bd
includes/Hooks.php
patch
|
blob
|
history
diff --git
a/includes/Hooks.php
b/includes/Hooks.php
index
3a33c2d
..
d434120
100644
(file)
--- 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;
}