Bug #22568 ยป array_merge_recursive_overrule.patch
t3lib/class.t3lib_div.php (working copy) | ||
---|---|---|
*/
|
||
public static function array_merge_recursive_overrule(array $arr0,array $arr1,$notAddKeys=0,$includeEmtpyValues=true) {
|
||
foreach ($arr1 as $key => $val) {
|
||
if(is_array($arr0[$key])) {
|
||
if (is_array($arr1[$key])) {
|
||
$arr0[$key] = self::array_merge_recursive_overrule($arr0[$key],$arr1[$key],$notAddKeys,$includeEmtpyValues);
|
||
}
|
||
if (isset($arr0[$key]) && is_array($arr0[$key]) && is_array($arr1[$key])) {
|
||
$arr0[$key] = self::array_merge_recursive_overrule($arr0[$key],$arr1[$key],$notAddKeys,$includeEmtpyValues);
|
||
} else {
|
||
if ($notAddKeys) {
|
||
if (isset($arr0[$key])) {
|