Issue Bug Closed

#14919t3lib_div::array_merge_recursive_overlay cannot overrule arrays with scalars

Jens Scheidtmann 08/11/05, 16:18 updated 01/06/14, 11:40

Description

if t3lib_div::array_merge_recursive_overlay is called with an array which contains arrays, the subarrays cannot be overruled by scalar values in the second array, as no code exists for the case that $arr0[$key] is an array, but $arr1[$key] is not.

This is unfortunate as pi_linkTP_keepPiVars(_url) documentation says for its $overrulePIvars parameter: “Further, if a value is a blank string it means the piVar key will not be a part of the link (unset)”. As this function uses array_merge_recursive_overlay, one cannot unset a form.

I have included a patch, I hope it is useful despite of my smattering of php arrays . . .

(issue imported from #M1367)

Reviews 0

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