Issue Bug Closed

#22568simple value cannot overwrite array value in "t3lib_div::array_merge_recursive_overrule"

Mikkel Ricky 05/02/10, 19:14 updated 01/08/14, 20:58

Description

Only array values can overwrite array values in “t3lib_div::array_merge_recursive_overrule”, i.e. if the first array contains a key with an array value and the second array contains the same key with a simple value then the value of the key in result will be the array value from the first array.

Steps to reproduce:

$arr0 = array(0 => array());
$arr1 = array(0 => 0);
$expected = array(0 => 0);
$actual = t3lib_div::array_merge_recursive_overrule($arr0, $arr1);

Now

$actual === array(0 => array())

but should be

$actual === array(0 => 0)

Applies to all versions of TYPO3.

(issue imported from #M14280)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.