Merge "ApiTestCase: Set correct user for derivate requests"
[lhc/web/wiklou.git] / includes / registration / ExtensionRegistry.php
index 1c36407..d767870 100644 (file)
@@ -126,7 +126,6 @@ class ExtensionRegistry {
         * @throws Exception
         */
        public function readFromQueue( array $queue ) {
-               $data = array( 'globals' => array( 'wgAutoloadClasses' => array() ) );
                $autoloadClasses = array();
                $processor = new ExtensionProcessor();
                foreach ( $queue as $path => $mtime ) {
@@ -164,7 +163,7 @@ class ExtensionRegistry {
 
        protected function exportExtractedData( array $info ) {
                foreach ( $info['globals'] as $key => $val ) {
-                       if ( !isset( $GLOBALS[$key] ) || !$GLOBALS[$key] ) {
+                       if ( !isset( $GLOBALS[$key] ) || ( is_array( $GLOBALS[$key] ) && !$GLOBALS[$key] ) ) {
                                $GLOBALS[$key] = $val;
                        } elseif ( $key === 'wgHooks' || $key === 'wgExtensionCredits' ) {
                                // Special case $wgHooks and $wgExtensionCredits, which require a recursive merge.