Project

General

Profile

Actions

Bug #22791

closed

Function getTreeList would insert a duplicate entry if cache value is a empty string

Added by Björn Paulsen about 14 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-06-02
Due date:
% Done:

0%

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

Description

The function tslib_cObj::getTreeList (file class.tslib_content.php) insert a record into the database to cache his results.

If is the result a empty string '', the cache check fails!

the Line 7341 must be change from
if (!empty($cacheEntry0['treelist'])) {

to
if (!empty($cacheEntry0['treelist']) || $cacheEntry0['treelist'] == '') {

Now will be generate this call a error:

$GLOBALS["TSFE"]->cObj->getTreeList(35,1);
$GLOBALS["TSFE"]->cObj->getTreeList(35,1);

UID 35 is a default page, without subpages.

SQL debug
caller t3lib_DB::exec_INSERTquery
ERROR Duplicate entry '3eca390262f23b50cd9b16f173750213' for key 'PRIMARY'
lastBuiltQuery INSERT INTO cache_treelist(md5hash,pid,treelist,tstamp) VALUES ('3eca390262f23b50cd9b16f173750213','35','','1275488363')
debug_backtrace require#80 // tslib_fe->INTincScript#453 // tslib_fe->INTincScript_process#3175 // tslib_cObj->USER#3236 // tslib_cObj->callUserFunction#789 // call_user_func_array#6594 // tx_cmsfme_pi1->main# // menue->main#125 // tslib_cObj->getTreeList#92 // t3lib_DB->exec_INSERTquery#7463 // t3lib_DB->debug#184
(issue imported from #M14595)

Actions

Also available in: Atom PDF