Project

General

Profile

Actions

Bug #42794

closed

Bug in class.tslib_content.php

Added by Mischa Heissmann almost 12 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2012-11-08
Due date:
% Done:

0%

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

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.

Actions #1

Updated by Mischa Heissmann almost 12 years ago

sorry, must be

if (is_array($cacheEntry) && !empty($cacheEntry['treelist'])) {

Actions #2

Updated by Wouter Wolters over 9 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)?

Actions #3

Updated by Riccardo De Contardi over 9 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'];
            }

Actions #4

Updated by Benni Mack over 9 years ago

Hey riccardo,

$GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow() delivers NULL if invalid syntax and FALSE if nothing found. Can you confirm that?

Actions #5

Updated by Alexander Opitz about 9 years ago

  • Assignee set to Riccardo De Contardi
Actions #6

Updated by Benni Mack about 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?

Actions #7

Updated by Alexander Opitz almost 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.

Actions

Also available in: Atom PDF