From fef37dc608b8c89f55565dbd047712a1113ac290 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 19 Dec 2015 11:14:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3redis=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E9=A9=B1=E5=8A=A8=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/cache/driver/redis.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/think/cache/driver/redis.php b/library/think/cache/driver/redis.php index 8771b3df..39d297e3 100644 --- a/library/think/cache/driver/redis.php +++ b/library/think/cache/driver/redis.php @@ -43,11 +43,11 @@ class Redis if (!empty($options)) { $this->options = array_merge($this->options, $options); } - $func = $options['persistent'] ? 'pconnect' : 'connect'; + $func = $this->options['persistent'] ? 'pconnect' : 'connect'; $this->handler = new \Redis; - false === $options['timeout'] ? - $this->handler->$func($options['host'], $options['port']) : - $this->handler->$func($options['host'], $options['port'], $options['timeout']); + false === $this->options['timeout'] ? + $this->handler->$func($this->options['host'], $this->options['port']) : + $this->handler->$func($this->options['host'], $this->options['port'], $this->options['timeout']); } /**