Issue Bug Closed

#18309Change elderly while(list()=each()) to foreach calls in t3lib_tstemplate

Franz Holzinger 02/26/08, 09:02 updated 08/06/10, 13:23

Description

In some PHP5 versions the explode functions does not reset the array. A following while, list and each combination will not do anything.

class.t3lib_tstemplate.php

if (strstr($all,’{$’)) {
$findConst = explode(‘{$’,$all);
$theConstList=Array();
next($findConst);
while(list(,$constVal)=each($findConst)) {

So replace this by a foreach instead of the while
or insert the
reset ($findConst);

(issue imported from #M7669)

Reviews 0

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