修正redis缓存驱动类

This commit is contained in:
thinkphp
2015-12-19 11:14:21 +08:00
parent c7eec6f386
commit fef37dc608

View File

@@ -43,11 +43,11 @@ class Redis
if (!empty($options)) { if (!empty($options)) {
$this->options = array_merge($this->options, $options); $this->options = array_merge($this->options, $options);
} }
$func = $options['persistent'] ? 'pconnect' : 'connect'; $func = $this->options['persistent'] ? 'pconnect' : 'connect';
$this->handler = new \Redis; $this->handler = new \Redis;
false === $options['timeout'] ? false === $this->options['timeout'] ?
$this->handler->$func($options['host'], $options['port']) : $this->handler->$func($this->options['host'], $this->options['port']) :
$this->handler->$func($options['host'], $options['port'], $options['timeout']); $this->handler->$func($this->options['host'], $this->options['port'], $this->options['timeout']);
} }
/** /**