Bug #42794
closedBug in class.tslib_content.php
0%
Description
Hi,
I was trying to get a list of pids using the method $this->cObj->getTreeList(). But nothing returned.
So I checked the class.tslib_content.php and recognized lines 7326ff
$cacheEntry = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow( 'treelist', 'cache_treelist', 'md5hash = \'' . $requestHash . '\' AND ( expires > ' . $GLOBALS['EXEC_TIME'] . ' OR expires = 0 )' ); if (is_array($cacheEntry)) { // cache hit return $cacheEntry['treelist']; }
unfortunately $cacheEntry is always an array, but it's empty. So I could fix this issue by changing line 7333 into
if (is_array($cacheEntry) && !empty($cacheEntry['treelist'])) {
Bye,
Mischa.
Updated by Mischa Heissmann about 12 years ago
sorry, must be
if (is_array($cacheEntry) && !empty($cacheEntry['treelist'])) {
Updated by Wouter Wolters almost 10 years ago
- Status changed from New to Needs Feedback
- Is Regression set to No
Hi,
does the problem still exists within newer versions of TYPO3 CMS (6.2.9)?
Updated by Riccardo De Contardi almost 10 years ago
I think it is still present:
I found the following lines in the file /typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
(7536 and following):
$requestHash = md5(serialize($parameters)); $cacheEntry = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow( 'treelist', 'cache_treelist', 'md5hash = \'' . $requestHash . '\' AND ( expires > ' . $GLOBALS['EXEC_TIME'] . ' OR expires = 0 )' ); if (is_array($cacheEntry)) { // Cache hit return $cacheEntry['treelist']; }
Updated by Benni Mack almost 10 years ago
Hey riccardo,
$GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow() delivers NULL if invalid syntax and FALSE if nothing found. Can you confirm that?
Updated by Alexander Opitz over 9 years ago
- Assignee set to Riccardo De Contardi
Updated by Benni Mack over 9 years ago
- Assignee deleted (
Riccardo De Contardi)
Well, yes. the code is like that, but Mischa, can you please provide an example on how to reproduce this issue?
Updated by Alexander Opitz about 9 years ago
- Status changed from Needs Feedback to Closed
No feedback within the last 90 days => closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.