Issue Bug Closed

#20390Warning is issued when creating first template

Xavier Perseguers 05/04/09, 10:08 updated 10/02/18, 12:27

Description

When creating the very first template a warning is issued (at least when Oracle is used):
Warning: Invalid argument supplied for foreach() in /var/www/typo3_src-trunk/t3lib/cache/backend/class.t3lib_cache_backend_dbbackend.php on line 170

Example how to reproduce:
- Have a blank website
- Create a page under root
- Click Web > Template
- Click button “Create template for a new site”

Solution:
Test that the returned value from $GLOBALS[‘TYPO3_DB’]->exec_SELECTgetRows is an array before trying to iterate over it.

(issue imported from #M11027)

Reviews 0

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