When the target has no entries at all, it doesn't know how to merge.
This commit is contained in:
Ad Schellevis 2015-07-16 10:55:36 +00:00
parent fa8f483760
commit 98939e3038

View File

@ -116,6 +116,9 @@ function array_merge_recursive_unique($array0, $array1) {
$result[$key] = call_user_func_array(__FUNCTION__, $args);
} else {
foreach($value as $vkey => $vval) {
if (!isset($result[$key]) || !is_array($result[$key])) {
$result[$key] = array();
}
$result[$key][$vkey] = $vval;
}
}