From d2de68b75fdea7b2f034218493ab8589820f8083 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sat, 30 Jan 2010 15:48:47 -0700 Subject: [PATCH] Add __wakeup() call to Horde_Memcache --- framework/Memcache/lib/Horde/Memcache.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) { -- 2.11.0