mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12: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);
|
$this->master(false);
|
||||||
|
|
||||||
|
$value = null;
|
||||||
try {
|
try {
|
||||||
$value = $this->handler->get($this->options['prefix'] . $name);
|
$value = $this->handler->get($this->options['prefix'] . $name);
|
||||||
} catch (\RedisException $e) {
|
} catch (\RedisException $e) {
|
||||||
|
|||||||
@@ -45,11 +45,11 @@ class Redis extends SessionHandler
|
|||||||
throw new Exception('_NOT_SUPPERT_:redis');
|
throw new Exception('_NOT_SUPPERT_:redis');
|
||||||
}
|
}
|
||||||
$this->handler = new \Redis;
|
$this->handler = new \Redis;
|
||||||
|
|
||||||
// 建立连接
|
// 建立连接
|
||||||
$func = $this->config['persistent'] ? 'pconnect' : 'connect';
|
$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->config['timeout']) :
|
|
||||||
$this->handler->$func($this->config['host'], $this->config['port']);
|
|
||||||
if ('' != $this->config['password']) {
|
if ('' != $this->config['password']) {
|
||||||
$this->handler->auth($this->config['password']);
|
$this->handler->auth($this->config['password']);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user