tcemain: iterate over columns only if they are set
When unit-testing own extensions that use typo3 backend functionality, I get E_WARNINGs about typo3 iterating over an undefined "columns" variable.
The attached patch checks if the table's "columns" value is set, thus preventing the warning.
Invalid argument supplied for foreach() /home/cweiske/foo/t3lib/class.t3lib_tcemain.php:5346 /home/cweiske/foo/t3lib/class.t3lib_tcemain.php:222
Updated by Oliver Hader over 10 years ago
- Status changed from New to Needs Feedback
- PHP Version set to 5.3
- Complexity set to easy
You can change that directly by your contribution. Get more information here: http://typo3.org/development/bug-fixing/resolving-bugs/
Besides that, can you please tell me why your table does not have columns? Is that intended or is it a regular table like 'tt_content' (the we might consider it as an additional bug). Thanks for your feedback...