From: Roan Kattouw Date: Tue, 31 Mar 2015 00:39:36 +0000 (-0700) Subject: registration: Use array_merge() rather than array plus when merging X-Git-Tag: 1.31.0-rc.0~11927^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=36e205b1fc97808dffc06e4d0719747f2bc97fcf;p=lhc%2Fweb%2Fwiklou.git registration: Use array_merge() rather than array plus when merging Because plus doesn't deal with numerical keys well. We do need old values to win, because LocalSettings.php runs before extension.json files. Change-Id: I56318fe586776940f7e28ca038dad49d24f24f2e --- diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index 52e860c32a..c06f7e396c 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -156,7 +156,7 @@ class ExtensionRegistry { // Now merge groups that didn't exist yet $GLOBALS[$key] += $val; } elseif ( is_array( $GLOBALS[$key] ) && is_array( $val ) ) { - $GLOBALS[$key] += $val; + $GLOBALS[$key] = array_merge( $val, $GLOBALS[$key] ); } // else case is a config setting where it has already been overriden, so don't set it } foreach ( $info['defines'] as $name => $val ) {