mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
check for php extentions before calling the cache driver. this avoids unnecessarry errors
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user