Merge pull request #10504 from woothemes/SiR-DanieL-patch-1

[WC-CLI] Allow multidimensional arrays to be created properly
This commit is contained in:
Claudio Sanches 2016-03-08 13:07:50 -03:00
commit 4760108a03
1 changed files with 1 additions and 1 deletions

View File

@ -367,7 +367,7 @@ class WC_CLI_Command extends WP_CLI_Command {
foreach ( $subarray as $sub_key => $sub_value ) {
$sub_key = $this->get_normalized_array_key( $sub_key );
if ( ! empty( $unflatten[ $first_key ][ $sub_key ] ) ) {
$unflatten[ $first_key ][ $sub_key ] = array_merge( $unflatten[ $first_key ][ $sub_key ], $sub_value );
$unflatten[ $first_key ][ $sub_key ] = array_merge_recursive( $unflatten[ $first_key ][ $sub_key ], $sub_value );
} else {
$unflatten[ $first_key ][ $sub_key ] = $sub_value;
}