Commit 98939e30 authored by Ad Schellevis's avatar Ad Schellevis

(legacy) xmlrpc sync fix for https://github.com/opnsense/core/issues/254

When the target has no entries at all, it doesn't know how to merge.
parent fa8f4837
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment