summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Cache/drivers/Cache_redis.php2
-rw-r--r--system/libraries/Calendar.php2
-rw-r--r--system/libraries/Session/drivers/Session_database_driver.php4
3 files changed, 6 insertions, 2 deletions
diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php
index 5236556d9..a35fbf6d2 100644
--- a/system/libraries/Cache/drivers/Cache_redis.php
+++ b/system/libraries/Cache/drivers/Cache_redis.php
@@ -111,7 +111,7 @@ class CI_Cache_redis extends CI_Driver
{
if (is_array($data) OR is_object($data))
{
- if ( ! $this->_redis->sAdd('_ci_redis_serialized', $id))
+ if ( ! $this->_redis->sIsMember('_ci_redis_serialized', $id) && ! $this->_redis->sAdd('_ci_redis_serialized', $id))
{
return FALSE;
}
diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php
index 014daac58..42fa00af2 100644
--- a/system/libraries/Calendar.php
+++ b/system/libraries/Calendar.php
@@ -131,7 +131,7 @@ class CI_Calendar {
{
$this->CI =& get_instance();
- if ( ! in_array('calendar_lang.php', $this->CI->lang->is_loaded, TRUE))
+ if ( ! isset($this->CI->lang->is_loaded['calendar_lang.php']))
{
$this->CI->lang->load('calendar');
}
diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php
index 76c1cf34e..1d01c2923 100644
--- a/system/libraries/Session/drivers/Session_database_driver.php
+++ b/system/libraries/Session/drivers/Session_database_driver.php
@@ -93,6 +93,10 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan
{
throw new Exception('Configured database connection is persistent. Aborting.');
}
+ elseif ($this->_db->cache_on)
+ {
+ throw new Exception('Configured database connection has cache enabled. Aborting.');
+ }
$db_driver = $this->_db->dbdriver.(empty($this->_db->subdriver) ? '' : '_'.$this->_db->subdriver);
if (strpos($db_driver, 'mysql') !== FALSE)