From da17b9bf74e6b074e3c38b358485bc31431533a3 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Mon, 16 Mar 2015 09:47:48 -0700 Subject: [PATCH] registration: Fix merging of $wgExtensionCredits $wgExtensionCredits has two-levels of arrays, so it needs to be merged recursively. Bug: T91609 Change-Id: I4e5fc50059745a89fb69bc1e05a299fd9aaee968 --- includes/registration/ExtensionRegistry.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index 5b18e72ddb..52e860c32a 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -142,8 +142,8 @@ class ExtensionRegistry { foreach ( $info['globals'] as $key => $val ) { if ( !isset( $GLOBALS[$key] ) || !$GLOBALS[$key] ) { $GLOBALS[$key] = $val; - } elseif ( $key === 'wgHooks' ) { - // Special case $wgHooks, which requires a recursive merge. + } elseif ( $key === 'wgHooks' || $key === 'wgExtensionCredits' ) { + // Special case $wgHooks and $wgExtensionCredits, which require a recursive merge. // Ideally it would have been taken care of in the first if block though. $GLOBALS[$key] = array_merge_recursive( $GLOBALS[$key], $val ); } elseif ( $key === 'wgGroupPermissions' ) { -- 2.20.1