diff options
author | Andrey Andreev <narf@devilix.net> | 2014-09-17 13:16:05 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-09-17 13:16:05 +0200 |
commit | 39ec29585b7cdca7edc1a0757c913a13a2ee4f85 (patch) | |
tree | a3614af6d998b0ae45067b64276d7121b75a05ed /system/libraries/Session/drivers/Session_redis_driver.php | |
parent | d069b9bc148f739733a5aa0a737e51e57c10b3ad (diff) |
feature/session (#3073): Redis driver save_path param parsing fixes
Close #3240
Diffstat (limited to 'system/libraries/Session/drivers/Session_redis_driver.php')
-rw-r--r-- | system/libraries/Session/drivers/Session_redis_driver.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index d4ce5b274..6d8044da1 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -81,8 +81,9 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle { log_message('error', 'Session: No Redis save path configured.'); } - elseif (preg_match('#(?:tcp://)?([^:]+)(?:\:(\d+))?(\?.+)?#', $this->_save_path, $matches)) + elseif (preg_match('#(?:tcp://)?([^:?]+)(?:\:(\d+))?(\?.+)?#', $this->_save_path, $matches)) { + isset($matches[3]) OR $matches[3] = ''; // Just to avoid undefined index notices below $this->_save_path = array( 'host' => $matches[1], 'port' => empty($matches[2]) ? NULL : $matches[2], |