Project

General

Profile

Actions

Bug #20390

closed

Warning is issued when creating first template

Added by Xavier Perseguers over 15 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2009-05-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)


Files

11027.diff (773 Bytes) 11027.diff Administrator Admin, 2009-05-04 10:09

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #20581: functions flushByTag and flushByTags in caching framework db backend are very unefficientClosedRupert Germann2009-06-05

Actions
Actions #1

Updated by Xavier Perseguers about 14 years ago

Quoting Rupert in Core mailing list:

the problem you described was caused by a tcemain action (saving a
tstemplate record) which called flushByTag() to clear a nonexisting
page_cache entry.

flushByTag() looked like this until #20581 was commited:

....
public function flushByTag($tag) {
foreach ($this->findIdentifiersByTag($tag) as $entryIdentifier) {
$this->remove($entryIdentifier);
}
}

now it looks like this:

public function flushByTag($tag) {
$GLOBALS['TYPO3_DB']->exec_DELETEquery(
$this->cacheTable,
$this->getListQueryForTag($tag)
);
}

this works way faster and should fix also #20581, because
findIdentifiersByTag() is not called anymore.

Actions #2

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF