From 1301b26669d1fcd44a895b8a723bd35947cc096a Mon Sep 17 00:00:00 2001 From: Christian Kuhn <lolli@schwarzbu.ch> Date: Wed, 11 Aug 2010 20:27:27 +0000 Subject: [PATCH] Fixed bug #15393: [Caching framework] API usage: Make sure lifetime is NULL or integer git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8572 709f56b5-9817-0410-a4d7-c38de5d9e867 --- ChangeLog | 1 + t3lib/class.t3lib_page.php | 2 +- typo3/sysext/cms/tslib/class.tslib_fe.php | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 08a318d409ad..215a1b5810d4 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ 2010-08-11 Christian Kuhn <lolli@schwarzbu.ch> + * Fixed bug #15393: [Caching framework] API usage: Make sure lifetime is NULL or integer * Fixed bug #15417: [Caching framework] DbBackend has() returns false for entries with unlimited lifetime 2010-08-11 Steffen Kamper <steffen@typo3.org> diff --git a/t3lib/class.t3lib_page.php b/t3lib/class.t3lib_page.php index fc9dda010147..bb7c3fc81cbe 100644 --- a/t3lib/class.t3lib_page.php +++ b/t3lib/class.t3lib_page.php @@ -1050,7 +1050,7 @@ class t3lib_pageSelect { $hash, $data, array('ident_' . $ident), - $lifetime + intval($lifetime) ); } } else { diff --git a/typo3/sysext/cms/tslib/class.tslib_fe.php b/typo3/sysext/cms/tslib/class.tslib_fe.php index 229d18a999d5..e93effe10e09 100644 --- a/typo3/sysext/cms/tslib/class.tslib_fe.php +++ b/typo3/sysext/cms/tslib/class.tslib_fe.php @@ -253,7 +253,7 @@ * @var t3lib_TStemplate */ var $tmpl=''; - var $cacheTimeOutDefault=''; // Is set to the time-to-live time of cached pages. If false, default is 60*60*24, which is 24 hours. + var $cacheTimeOutDefault = FALSE; // Is set to the time-to-live time of cached pages. If false, default is 60*60*24, which is 24 hours. var $cacheContentFlag = 0; // Set internally if cached content is fetched from the database var $cacheExpires=0; // Set to the expire time of cached content var $isClientCachable=FALSE; // Set if cache headers allowing caching are sent. @@ -4636,7 +4636,7 @@ if (version == "n3") { function get_cache_timeout() { // Cache period was set for the page: if ($this->page['cache_timeout']) { - $cacheTimeout = $this->page['cache_timeout']; + $cacheTimeout = intval($this->page['cache_timeout']); // Cache period was set for the whole site: } elseif ($this->cacheTimeOutDefault) { $cacheTimeout = $this->cacheTimeOutDefault; -- GitLab