From 6a60f4a74b3c30833070c3f40285fbe9e427fce9 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Fri, 12 Jul 2024 12:51:19 +1200 Subject: [PATCH] FIX Use valid values for APCu version --- 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 4c5a0803701..9e18a7983f0 100644 --- a/src/Core/Cache/ApcuCacheFactory.php +++ b/src/Core/Cache/ApcuCacheFactory.php @@ -40,6 +40,9 @@ public function createPsr6(string $service, array $params = []): CacheItemPoolIn $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(