diff options
author | Tyler Brownell <brownelltyler@gmail.com> | 2015-04-27 17:54:08 +0200 |
---|---|---|
committer | Tyler Brownell <brownelltyler@gmail.com> | 2015-04-27 17:54:08 +0200 |
commit | b7661228c22c180cdf289300c88825dafeda39d9 (patch) | |
tree | 9031282afb1090bf08145489fcd5385bd8b34bae | |
parent | 0416a7f859e1ee6df557644b36ca10cfd356d224 (diff) |
Adds error-level log messages when invalid adapters are set.
-rw-r--r-- | system/libraries/Cache/Cache.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/system/libraries/Cache/Cache.php b/system/libraries/Cache/Cache.php index 73dec72ab..ff68a4fd8 100644 --- a/system/libraries/Cache/Cache.php +++ b/system/libraries/Cache/Cache.php @@ -104,11 +104,19 @@ class CI_Cache extends CI_Driver_Library { { $this->_adapter = $config['adapter']; } + elseif (! in_array($config['adapter'], $this->valid_drivers)) + { + log_message('error', 'Cache adapter "'.$config['adapter'].'" is invalid.'); + } if (isset($config['backup']) && in_array($config['backup'], $this->valid_drivers)) { $this->_backup_driver = $config['backup']; } + elseif (! in_array($config['backup'], $this->valid_drivers)) + { + log_message('error', 'Cache backup adapter "'.$config['backup'].'" is invalid.'); + } isset($config['key_prefix']) && $this->key_prefix = $config['key_prefix']; |