$wgExtensionCredits has two-levels of arrays, so it needs to be merged
recursively.
Bug: T91609
Change-Id: I4e5fc50059745a89fb69bc1e05a299fd9aaee968
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' ) {