From 3ed51b53e6208ecdd5320a1b6e7b2ccbe719afae Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 2 Feb 2026 14:11:51 +0100 Subject: [PATCH] check for php extentions before calling the cache driver. this avoids unnecessarry errors --- application/models/Debug_model.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/models/Debug_model.php b/application/models/Debug_model.php index 15a09236f..6b8441122 100644 --- a/application/models/Debug_model.php +++ b/application/models/Debug_model.php @@ -243,6 +243,12 @@ class Debug_model extends CI_Model $available_adapters = ['file', 'redis', 'memcached', 'apcu']; foreach ($available_adapters as $adapter) { + // For redis, memcached and apcu we should check for the extension first to avoid unnecessary errors + if (in_array($adapter, ['redis', 'memcached', 'apcu'])) { + $is_supported = extension_loaded($adapter) ?? false; + $response['adapters'][$adapter] = $is_supported; + continue; + } $response['adapters'][$adapter] = $this->cache->is_supported($adapter); }