diff options
author | Jonty Sewell <jontysewell@gmail.com> | 2016-02-05 11:38:43 +0100 |
---|---|---|
committer | Jonty Sewell <jontysewell@gmail.com> | 2016-02-05 11:38:43 +0100 |
commit | 0f19fd0550e95354e8512c28ff19799aa913c0f9 (patch) | |
tree | 727fa890c1752a4b6227e18eaf23246efd97b27c | |
parent | a7f9ea28aa40bd036de1cee7a4ec4ab63235fd12 (diff) |
Setting the flag to FALSE is unnecessary since it defaults to FALSE, therefore this block of code can be reduced to a single statement
Signed-off-by: Jonty Sewell <jontysewell@gmail.com>
-rw-r--r-- | system/libraries/Session/drivers/Session_redis_driver.php | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index be5b37e81..c4483e439 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -198,16 +198,7 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle $session_data = $this->_redis->get($this->_key_prefix.$session_id); - if ($session_data === FALSE) - { - // The session ID does not exist in redis yet, so set a flag to create it - $this->_key_exists = FALSE; - $session_data = ''; - } - else - { - $this->_key_exists = TRUE; - } + is_string($session_data) && $this->_key_exists = TRUE; $this->_fingerprint = md5($session_data); return $session_data; |