[TYPO3-core] RFC #0011512: replace while(list()...) by foreach in the TYPO3 core part 1

Rupert Germann rupi at gmx.li
Tue Jul 14 12:41:34 CEST 2009


Hi Franz,

thanks for reviewing this "monster" ;-)

Franz Koch wrote:
... 
> --- line 60 in patchfile ---
> $confLL = $this->conf['_LOCAL_LANG.'];
> foreach($confLL...
> ----------------------------
> It's not vital, but wouldn't a referenced copy save some bytes here?
> Same in lines 134 and 731 of the patch.

an assignment is automatically a reference in PHP5 until you change
something in the copy. 

> And now a real bug that should be fixed :)
> 
> --- line 502 in patch ----
> -     while(list(,$val)=each($altRootLine))   {
> +     foreach ($rootLine as $val) {
> --------------------------
> it has to be $altRootLine(!) according to the surrounding code.
>               -----
> 
> after that change I give my nonCoreDev+1 by reading. Thanks for your
> work on this.

good catch! looks like a classical copy&paste error.

attached is v2 which fixes this issue.

greets
rupert
 



More information about the TYPO3-team-core mailing list