mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
fix Undefined variable: value
This commit is contained in:
1
library/think/cache/driver/Redisd.php
vendored
1
library/think/cache/driver/Redisd.php
vendored
@@ -200,6 +200,7 @@ class Redisd
|
||||
{
|
||||
$this->master(false);
|
||||
|
||||
$value = null;
|
||||
try {
|
||||
$value = $this->handler->get($this->options['prefix'] . $name);
|
||||
} catch (\RedisException $e) {
|
||||
|
||||
@@ -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']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user