Fixed bug #15393: [Caching framework] API usage: Make sure lifetime is NULL or integer
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 11 Aug 2010 20:29:05 +0000 (20:29 +0000)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 11 Aug 2010 20:29:05 +0000 (20:29 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-4@8573 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_page.php
typo3/sysext/cms/tslib/class.tslib_fe.php

index 04bfa01..a5c9a5a 100755 (executable)
--- 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>
index fc9dda0..bb7c3fc 100644 (file)
@@ -1050,7 +1050,7 @@ class t3lib_pageSelect {
                                        $hash,
                                        $data,
                                        array('ident_' . $ident),
-                                       $lifetime
+                                       intval($lifetime)
                                );
                        }
                } else {
index 2f0d438..5f1541b 100644 (file)
         * @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;