Merge pull request #4526 from masterklavi/redis_refactor
Remove an unnecessary assignment from Cache_redis configuration
diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php
index a58aaef..d4d95eb 100644
--- a/system/libraries/Cache/drivers/Cache_redis.php
+++ b/system/libraries/Cache/drivers/Cache_redis.php
@@ -97,15 +97,17 @@
return;
}
- $config = array();
$CI =& get_instance();
if ($CI->config->load('redis', TRUE, TRUE))
{
- $config = $CI->config->item('redis');
+ $config = array_merge(self::$_default_config, $CI->config->item('redis'));
+ }
+ else
+ {
+ $config = self::$_default_config;
}
- $config = array_merge(self::$_default_config, $config);
$this->_redis = new Redis();
try