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 almost 14 years ago. Updated over 10 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 #1

Updated by Björn Paulsen almost 14 years ago

Sorry, the line must be:
if (!empty($cacheEntry0['treelist']) || ($cacheEntry0['treelist'] == '' && $cacheEntry0['treelist'] <> null)) {

Actions #2

Updated by Björn Paulsen almost 14 years ago

I hope this is now right:
if (!empty($cacheEntry0['treelist']) || ($cacheEntry0['treelist'] == '' && is_string($cacheEntry0['treelist']))) {

Actions #3

Updated by Alexander Opitz almost 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #4

Updated by Alexander Opitz over 10 years ago

  • Is Regression set to No

No response in over 3 month so closing this issue.

If you think this issue should be reopened, then write to the bugs mailing list.

Actions #5

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to Closed
Actions

Also available in: Atom PDF