mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-22 14:12:25 +00:00
avoid PHP Fatal Error when redis PHP module is not available
This commit is contained in:
parent
6c18e8f112
commit
46f5c48ba0
@ -218,4 +218,14 @@ class Redis extends BaseClass implements BaseInterface
|
||||
|
||||
return $this->_version;
|
||||
}
|
||||
|
||||
public function isAvailable()
|
||||
{
|
||||
if (extension_loaded('redis')) {
|
||||
return parent::isAvailable();
|
||||
}
|
||||
|
||||
// when php module 'redis' not available or just disable by configuration (see .env PHP_MODULES_DISABLE)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user