Merge pull request #5204 from tersmitten/memcached-engine-segfaults-with-memcached-client-version-200

Bugfix for: Memcached Engine segfaults with memcached client version < 2.0.0
This commit is contained in:
Mark Story 2014-11-18 16:25:31 -05:00
commit 9f5d99c9cb

View file

@ -104,7 +104,11 @@ class MemcachedEngine extends CacheEngine {
return true; 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(); $this->_setOptions();
if (count($this->_Memcached->getServerList())) { if (count($this->_Memcached->getServerList())) {