[TYPO3-core] RFC #17420: Add LOOP cObject

Xavier Perseguers typo3 at perseguers.ch
Mon Jan 31 17:18:11 CET 2011


Hi,

Condition at line 66 of LOOP class will be changed like that upon commit:

if (!is_array($row)) {
	$row = array($row);
}

to

if (!(is_array($row) || is_object($row))) {
	$row = array($row);
}

this is useful when you loop over an array of domain objects and use a 
FLUIDTEMPLATE as renderObj. Without this line, your object is provided 
wrapped into an array with a single element. This array wrapping is 
useful though if your internal object is a single value such as string, 
which could be the case if you passed some iterator.

Xavier


More information about the TYPO3-team-core mailing list