Issue Bug Closed

#19501same key wrongly used in substituteMarkerArrayCached

Franz Holzinger 10/23/08, 22:25 updated 03/23/20, 13:43

Description

If you call substituteMarkerArrayCached twice with the same template part, and once you want to use


some text

First you set the $wrappedSubpartContentArray[‘###MYSUBPART###’]=’‘, $subpartContentArray=array(); where the other array keys remain the same.

Secondly you do the same call, however $wrappedSubpartContentArray=array() and
$subpartContentArray[‘###MYSUBPART###’]=’‘

The second call will never do what you want, it gives you ‘some text’ instead of an empty string. This is because the function substituteMarkerArrayCached calculates the same cache although it has formerly been called with the same key set in $wrappedSubpartContentArray and not in $subpartContentArray

Solution:The keys of all arrays must not be merged to generate the md5 sum. It must be considered somewhere from which array a key comes from.

(issue imported from #M9631)

Reviews 1