We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 5783874c authored by Brion Vibber's avatar Brion Vibber

Clean up host/port separation in memcached plugin -- use : not ; as separator...

Clean up host/port separation in memcached plugin -- use : not ; as separator and clean up some warnings
parent 2f32181c
......@@ -165,20 +165,18 @@ class MemcachePlugin extends Plugin
$this->_conn = new Memcache();
if (is_array($this->servers)) {
foreach ($this->servers as $server) {
list($host, $port) = @explode(';', $server);
if (empty($port)) {
$port = 11211;
}
$this->_conn->addServer($host, $port, $this->persistent);
}
$servers = $this->servers;
} else {
$this->_conn->addServer($this->servers, $this->persistent);
list($host, $port) = explode(';', $this->servers);
if (empty($port)) {
$servers = array($this->servers);
}
foreach ($servers as $server) {
if (strpos($server, ':') !== false) {
list($host, $port) = explode(':', $server);
} else {
$host = $server;
$port = 11211;
}
$this->_conn->addServer($host, $port, $this->persistent);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment