diff options
author | Tyler Brownell <brownelltyler@gmail.com> | 2015-04-28 16:33:05 +0200 |
---|---|---|
committer | Tyler Brownell <brownelltyler@gmail.com> | 2015-04-28 16:33:05 +0200 |
commit | ef0173db881f326db14e00cb333b9059349fc9a3 (patch) | |
tree | 0bb3386ab90d07c7161e97339bd8f4d339603ec8 /system | |
parent | b7661228c22c180cdf289300c88825dafeda39d9 (diff) |
Removed extra adapter validation. Adapter validation already happens in the system Driver library.
Diffstat (limited to 'system')
-rw-r--r-- | system/libraries/Cache/Cache.php | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/system/libraries/Cache/Cache.php b/system/libraries/Cache/Cache.php index ff68a4fd8..215a7c528 100644 --- a/system/libraries/Cache/Cache.php +++ b/system/libraries/Cache/Cache.php @@ -100,24 +100,8 @@ class CI_Cache extends CI_Driver_Library { */ public function __construct($config = array()) { - if (isset($config['adapter']) && in_array($config['adapter'], $this->valid_drivers)) - { - $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['adapter']) && $this->_adapter = $config['adapter']; + isset($config['backup']) && $this->_backup_driver = $config['backup']; isset($config['key_prefix']) && $this->key_prefix = $config['key_prefix']; // If the specified adapter isn't available, check the backup. |