mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Bugfix for: Memcached Engine segfaults with memcached client version < 2.0.0
Fixes #5028
This commit is contained in:
parent
30f8073537
commit
f2c84602b9
1 changed files with 5 additions and 1 deletions
|
@ -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())) {
|
||||
|
|
Loading…
Reference in a new issue