[TYPO3-core] RFC: Bug #4888 - Invalid argument supplied for foreach() in t3lib/class.t3lib_install.php on line 392

Michael Stucki michael at typo3.org
Wed Aug 29 11:41:01 CEST 2007

Hi Andreas,

> Problem:
> The variable $cfg['keys'] is treated as an array but can be an empty
> string. When treating the variable as an array it is not checked if the
> variable is indeed an array.
> Solution:
> Check if $cfg['keys'] is an array before running it through foreach.

All fine. But please try to stick to the CGL:

-       if ( is_array($cfg['keys']) ) {
+       if (is_array($cfg['keys'])) {

There's nothing wrong with your styling except that I would like to have a
common look for the whole core...

- michael
Use a newsreader! Check out

More information about the TYPO3-team-core mailing list