Issue Bug Closed

#42794Bug in class.tslib_content.php

Mischa Heissmann 11/08/12, 15:51 updated 10/27/15, 14:34

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.