From b94a06ab113114216ee595240b575a97abdc3661 Mon Sep 17 00:00:00 2001 From: Beatrycze Volk Date: Tue, 28 May 2024 18:33:22 +0200 Subject: [PATCH] Fix cache assignment in `ext_localconf.php for arrays --- ext_localconf.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ext_localconf.php b/ext_localconf.php index fc86f16..ae55d11 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -16,9 +16,8 @@ // cache configurations // Cache for Collection ViewHelper (Matomo statistics) -if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['slub_digitalcollections_matomo_collections'])) { - $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['slub_digitalcollections_matomo_collections'] = []; -} +$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['slub_digitalcollections_matomo_collections'] ??= []; + if (!isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['slub_digitalcollections_matomo_collections']['backend'])) { $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['slub_digitalcollections_matomo_collections']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\SimpleFileBackend'; } @@ -27,9 +26,8 @@ } // Cache for Collection Plugin -if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['slub_digitalcollections_collections'])) { - $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['slub_digitalcollections_collections'] = []; -} +$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['slub_digitalcollections_collections'] ??= []; + if (!isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['slub_digitalcollections_collections']['backend'])) { $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['slub_digitalcollections_collections']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\SimpleFileBackend'; }