Merge "Chinese Conversion Table Update 2016-2"
[lhc/web/wiklou.git] / includes / registration / ExtensionRegistry.php
index bc9b26d..dc53ca4 100644 (file)
@@ -234,9 +234,7 @@ class ExtensionRegistry {
                foreach ( $info['globals'] as $key => $val ) {
                        // If a merge strategy is set, read it and remove it from the value
                        // so it doesn't accidentally end up getting set.
-                       // Need to check $val is an array for PHP 5.3 which will return
-                       // true on isset( 'string'['foo'] ).
-                       if ( isset( $val[self::MERGE_STRATEGY] ) && is_array( $val ) ) {
+                       if ( is_array( $val ) && isset( $val[self::MERGE_STRATEGY] ) ) {
                                $mergeStrategy = $val[self::MERGE_STRATEGY];
                                unset( $val[self::MERGE_STRATEGY] );
                        } else {
@@ -276,13 +274,12 @@ class ExtensionRegistry {
                foreach ( $info['defines'] as $name => $val ) {
                        define( $name, $val );
                }
-               foreach ( $info['callbacks'] as $cb ) {
-                       call_user_func( $cb );
-               }
-
                foreach ( $info['autoloaderPaths'] as $path ) {
                        require_once $path;
                }
+               foreach ( $info['callbacks'] as $cb ) {
+                       call_user_func( $cb );
+               }
 
                $this->loaded += $info['credits'];
                if ( $info['attributes'] ) {