[BUGFIX] Install tool fatal with options for cache_classes 99/36999/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 18 Feb 2015 18:17:58 +0000 (19:17 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Wed, 18 Feb 2015 20:03:19 +0000 (21:03 +0100)
Setting an option like cacheDirectory for cache_classes or
cache_core triggers a fatal if calling the install tool.
This happens because the install tool calls the bootstrap
loadConfigurationAndInitialize() with $allowCaching = FALSE
which then calls disableCoreAndClassesCache() and sets the
backend of both caches to NullBackend. The cacheDirectory
option however is not supported by this backend.
Solution is to unset any options configured for these caches
within disableCoreAndClassesCache().

Resolves: #65153
Releases: master, 6.2
Change-Id: I3200d6752794c1769fe4e049c301ee8fa185ecf9
Reviewed-on: http://review.typo3.org/36999
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/core/Classes/Core/Bootstrap.php

index 545805e..87e5704 100644 (file)
@@ -445,8 +445,10 @@ class Bootstrap {
        public function disableCoreAndClassesCache() {
                $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_core']['backend']
                        = \TYPO3\CMS\Core\Cache\Backend\NullBackend::class;
+               unset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_core']['options']);
                $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_classes']['backend']
                        = \TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend::class;
+               unset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_classes']['options']);
                return $this;
        }