fix Undefined variable: value

This commit is contained in:
尘缘
2016-05-08 11:10:23 +08:00
parent 83202fb9fc
commit caf86af6b2
2 changed files with 4 additions and 3 deletions

View File

@@ -45,11 +45,11 @@ class Redis extends SessionHandler
throw new Exception('_NOT_SUPPERT_:redis');
}
$this->handler = new \Redis;
// 建立连接
$func = $this->config['persistent'] ? 'pconnect' : 'connect';
$this->config['timeout'] > 0 ?
$this->handler->$func($this->config['host'], $this->config['port'], $this->config['timeout']) :
$this->handler->$func($this->config['host'], $this->config['port']);
$this->handler->$func($this->config['host'], $this->config['port'], $this->config['timeout']);
if ('' != $this->config['password']) {
$this->handler->auth($this->config['password']);
}