[BUGFIX] Use t3lib_cache_frontend_VariableFrontend as fallback frontend
authorXavier Perseguers <typo3@perseguers.ch>
Fri, 24 Jun 2011 08:39:39 +0000 (10:39 +0200)
committerXavier Perseguers <typo3@perseguers.ch>
Fri, 24 Jun 2011 11:50:27 +0000 (13:50 +0200)
According to wiki documentation, integrators are told to define both
'frontend' and 'backend' in their caching configuration.

This hardly makes sense as the frontend input format is the responsibility
of the extension developer, not the integrator and should not be forced
to be defined. Instead, it should fallback to the VariableFrontend if not
explicitly set.

Without fallback, t3lib_div::makeInstance() is called with an empty
class name which throws an exception when instantiated using reflection.

Change-Id: Iaf59864d86483e2d0a08b92c54dad579e2f81347
Resolves: #27677
Reviewed-on: http://review.typo3.org/2905
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Susanne Moog
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
t3lib/cache/class.t3lib_cache_factory.php

index 190ce9b..6d8d113 100644 (file)
@@ -115,6 +115,7 @@ class t3lib_cache_Factory implements t3lib_Singleton {
 
 
                $cacheReference = $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheFrontends'][$cacheObjectName];
+               $cacheReference = $cacheReference ? $cacheReference : 't3lib_cache_frontend_VariableFrontend';
 
                if (strpos($cacheReference, ':') === FALSE) {
                        $cacheClassReference = $cacheReference;