Fixed bug #12109: Call to getCache() on a non-object in some extensions
authorRupert Germann <rupi@gmx.li>
Wed, 25 Nov 2009 19:40:18 +0000 (19:40 +0000)
committerRupert Germann <rupi@gmx.li>
Wed, 25 Nov 2009 19:40:18 +0000 (19:40 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6548 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_page.php

index 4a2227f..0d4ff30 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2009-11-25  Rupert Germann  <rupi@gmx.li>
 
        * Fixed bug #12133: autoloaders registered by extensions slow down the core autoloader
+       * Fixed bug #12109: Call to getCache() on a non-object in some extensions
 
 2009-11-25  Christian Kuhn  <lolli@schwarzbu.ch>
 
index 8635ed9..06d77f3 100644 (file)
@@ -975,11 +975,13 @@ class t3lib_pageSelect {
                $hashContent = null;
 
                if (TYPO3_UseCachingFramework) {
-                       $contentHashCache = $GLOBALS['typo3CacheManager']->getCache('cache_hash');
-                       $cacheEntry = $contentHashCache->get($hash);
+                       if (is_object($GLOBALS['typo3CacheManager'])) {
+                               $contentHashCache = $GLOBALS['typo3CacheManager']->getCache('cache_hash');
+                               $cacheEntry = $contentHashCache->get($hash);
 
-                       if ($cacheEntry) {
-                               $hashContent = $cacheEntry;
+                               if ($cacheEntry) {
+                                       $hashContent = $cacheEntry;
+                               }
                        }
                } else {
                        $expTime = intval($expTime);
@@ -1010,12 +1012,14 @@ class t3lib_pageSelect {
         */
        public static function storeHash($hash, $data, $ident, $lifetime = 0) {
                if (TYPO3_UseCachingFramework) {
-                       $GLOBALS['typo3CacheManager']->getCache('cache_hash')->set(
-                               $hash,
-                               $data,
-                               array('ident_' . $ident),
-                               $lifetime
-                       );
+                       if (is_object($GLOBALS['typo3CacheManager'])) {
+                               $GLOBALS['typo3CacheManager']->getCache('cache_hash')->set(
+                                       $hash,
+                                       $data,
+                                       array('ident_' . $ident),
+                                       $lifetime
+                               );
+                       }
                } else {
                        $insertFields = array(
                                'hash' => $hash,