Fixed bug #14149: tslib_cObj::getTreeList() incorrectly checks cache entries
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Tue, 20 Apr 2010 12:39:59 +0000 (12:39 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Tue, 20 Apr 2010 12:39:59 +0000 (12:39 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7409 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_content.php

index 810a27a..390f618 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2010-04-20  Dmitry Dulepov  <dmitry.dulepov@gmail.com>
 
        * Fixed bug #13741: cache_treelist does not take FE users into account
+       * Fixed bug #14149: tslib_cObj::getTreeList() incorrectly checks cache entries
 
 2010-04-20  Susanne Moog <typo3@susanne-moog.de>
 
index 4d671f8..b91cb81 100644 (file)
@@ -7354,15 +7354,15 @@ class tslib_cObj {
                                );
                                $requestHash = md5(serialize($parameters));
 
-                               $cacheEntry = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
+                               list($cacheEntry) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                                        'treelist',
                                        'cache_treelist',
                                        'md5hash = \'' . $requestHash . '\' AND ( expires > ' . $GLOBALS['EXEC_TIME'] . ' OR expires = 0 )'
                                );
 
-                               if (!empty($cacheEntry[0]['treelist'])) {
+                               if (is_array($cacheEntry)) {
                                                // cache hit
-                                       return $cacheEntry[0]['treelist'];
+                                       return $cacheEntry['treelist'];
                                }
 
                                        // If Id less than zero it means we should add the real id to list: