Bugfix for: Memcached Engine segfaults with memcached client version < 2.0.0

Fixes #5028
This commit is contained in:
Mischa ter Smitten 2014-11-18 21:26:57 +01:00
parent 30f8073537
commit f2c84602b9

View file

@ -104,7 +104,11 @@ class MemcachedEngine extends CacheEngine {
return true;
}
$this->_Memcached = new Memcached($this->settings['persistent'] ? (string)$this->settings['persistent'] : null);
if (!$this->settings['persistent']) {
$this->_Memcached = new Memcached();
} else {
$this->_Memcached = new Memcached((string)$this->settings['persistent']);
}
$this->_setOptions();
if (count($this->_Memcached->getServerList())) {