Bug #42794
closed
Bug in class.tslib_content.php
Added by Mischa Heissmann almost 12 years ago.
Updated almost 9 years ago.
Category:
Content Rendering
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.
sorry, must be
if (is_array($cacheEntry) && !empty($cacheEntry['treelist'])) {
- 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)?
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'];
}
Hey riccardo,
$GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow() delivers NULL if invalid syntax and FALSE if nothing found. Can you confirm that?
- Assignee set to Riccardo De Contardi
- 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?
- 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.
Also available in: Atom
PDF