if ( !is_array( $info ) ) {
throw new Exception( "$path is not a valid JSON file." );
}
- if ( !isset( $info['manifest_version' ] ) ) {
+ if ( !isset( $info['manifest_version'] ) ) {
// For backwards-compatability, assume a version of 1
$info['manifest_version'] = 1;
}
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.