From: Michael M Slusarz Date: Sat, 30 Jan 2010 22:48:47 +0000 (-0700) Subject: Add __wakeup() call to Horde_Memcache X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d2de68b75fdea7b2f034218493ab8589820f8083;p=horde.git Add __wakeup() call to Horde_Memcache --- diff --git a/framework/Memcache/lib/Horde/Memcache.php b/framework/Memcache/lib/Horde/Memcache.php index 920f40772..5b2daa5e3 100644 --- a/framework/Memcache/lib/Horde/Memcache.php +++ b/framework/Memcache/lib/Horde/Memcache.php @@ -107,6 +107,8 @@ class Horde_Memcache /** * Constructor. + * + * @throws Horde_Exception */ protected function __construct() { @@ -114,6 +116,16 @@ class Horde_Memcache $this->_params['prefix'] = (empty($this->_params['prefix'])) ? 'horde' : $this->_params['prefix']; $this->_large = !empty($this->_params['large_items']); + $this->__wakeup(); + } + + /** + * Do re-initialization on unserialize(). + * + * @throws Horde_Exception + */ + public function __wakeup() + { $servers = array(); $this->_memcache = new Memcache; for ($i = 0, $n = count($this->_params['hostspec']); $i < $n; ++$i) {