diff --git a/library/think/session/driver/Memcache.php b/library/think/session/driver/Memcache.php index d8058550..e3b0d1be 100644 --- a/library/think/session/driver/Memcache.php +++ b/library/think/session/driver/Memcache.php @@ -54,8 +54,8 @@ class Memcache extends SessionHandler foreach ((array) $hosts as $i => $host) { $port = isset($ports[$i]) ? $ports[$i] : $ports[0]; $this->config['timeout'] > 0 ? - $this->handler->addServer($host, $port, $this->config['persistent'], 1) : - $this->handler->addServer($host, $port, $this->config['persistent'], 1, $this->config['timeout']); + $this->handler->addServer($host, $port, $this->config['persistent'], 1, $this->config['timeout']) : + $this->handler->addServer($host, $port, $this->config['persistent'], 1); } return true; }