From d540877eedd6f5f71baabcfbaf1e50789407a156 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Mon, 15 Jul 2024 09:26:50 +1200 Subject: [PATCH] FIX Use valid values for APCu version (#11304) --- src/Core/Cache/ApcuCacheFactory.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Core/Cache/ApcuCacheFactory.php b/src/Core/Cache/ApcuCacheFactory.php index 4c5a08037..9e18a7983 100644 --- a/src/Core/Cache/ApcuCacheFactory.php +++ b/src/Core/Cache/ApcuCacheFactory.php @@ -40,6 +40,9 @@ class ApcuCacheFactory extends AbstractCacheFactory implements InMemoryCacheFact $defaultLifetime = isset($params['defaultLifetime']) ? $params['defaultLifetime'] : 0; // $version is optional - defaults to null. $version = isset($params['version']) ? $params['version'] : Environment::getEnv('SS_APCU_VERSION'); + if ($version === false) { + $version = null; + } $useInjector = isset($params['useInjector']) ? $params['useInjector'] : true; return $this->instantiateCache(