summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-09-14 12:56:41 +0200
committerAndrey Andreev <narf@devilix.net>2015-09-14 12:56:41 +0200
commit24ff6dbcf88a9095785c1cb8fdba213843756595 (patch)
tree9af3784fe6ab73b021ceae08a58911792c4f91af
parentf2239fe1f6e0578a00afb88e9fc2b2cdd2ac2626 (diff)
Fix #4044
-rw-r--r--system/libraries/Cache/drivers/Cache_redis.php10
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 6 insertions, 5 deletions
diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php
index 2825acfd3..ea0059ff7 100644
--- a/system/libraries/Cache/drivers/Cache_redis.php
+++ b/system/libraries/Cache/drivers/Cache_redis.php
@@ -117,17 +117,17 @@ class CI_Cache_redis extends CI_Driver
{
log_message('error', 'Cache: Redis connection failed. Check your configuration.');
}
+
+ if (isset($config['password']) && ! $this->_redis->auth($config['password']))
+ {
+ log_message('error', 'Cache: Redis authentication failed.');
+ }
}
catch (RedisException $e)
{
log_message('error', 'Cache: Redis connection refused ('.$e->getMessage().')');
}
- if (isset($config['password']) && ! $this->_redis->auth($config['password']))
- {
- log_message('error', 'Cache: Redis authentication failed.');
- }
-
// Initialize the index of serialized values.
$serialized = $this->_redis->sMembers('_ci_redis_serialized');
empty($serialized) OR $this->_serialized = array_flip($serialized);
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 0400d13aa..a13f2d2ac 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -28,6 +28,7 @@ Bug fixes for 3.0.2
- Fixed a bug (#4096) - :doc:`Query Builder <database/query_builder>` didn't apply *dbprefix* when compiling BETWEEN conditions.
- Fixed a bug (#4105) - :doc:`Form Validation Library <libraries/form_validation>` didn't allow pipe characters inside "bracket parameters" when using a string ruleset.
- Fixed a bug (#4109) - :doc:`Routing <general/routing>` to *default_controller* didn't work when *enable_query_strings* is set to TRUE.
+- Fixed a bug (#4044) - :doc:`Cache Library <libraries/caching>` 'redis' driver didn't catch ``RedisException`` that could be thrown during authentication.
Version 3.0.1
=============