dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rdbms: add setTempTablesOnlyMode() to suppress CONN_TRX_AUTOCOMMIT during tests
[lhc/web/wiklou.git]
/
includes
/
Hooks.php
diff --git
a/includes/Hooks.php
b/includes/Hooks.php
index
c22dc97
..
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 ) {
* @since 1.18
*/
public static function register( $name, $callback ) {
- if ( !isset( self::$handlers[$name] ) ) {
- self::$handlers[$name] = [];
- }
-
self::$handlers[$name][] = $callback;
}
self::$handlers[$name][] = $callback;
}
@@
-62,6
+58,7
@@
class Hooks {
*
* @since 1.21
* @throws MWException If not in testing mode.
*
* @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' ) ) {
*/
public static function clear( $name ) {
if ( !defined( 'MW_PHPUNIT_TEST' ) && !defined( 'MW_PARSER_TEST' ) ) {