From d77e08729b812333bc22680c4072a6e41f4ba40e Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 2 Jun 2013 11:55:46 +0200 Subject: Fix removing flags from serialized object before saving it in DB --- program/lib/Roundcube/rcube_imap_cache.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'program/lib/Roundcube/rcube_imap_cache.php') diff --git a/program/lib/Roundcube/rcube_imap_cache.php b/program/lib/Roundcube/rcube_imap_cache.php index 47d9aaf4a..089a52439 100644 --- a/program/lib/Roundcube/rcube_imap_cache.php +++ b/program/lib/Roundcube/rcube_imap_cache.php @@ -407,8 +407,8 @@ class rcube_imap_cache return; } - $msg = serialize($this->db->encode(clone $message)); $flags = 0; + $msg = clone $message; if (!empty($message->flags)) { foreach ($this->flags as $idx => $flag) { @@ -417,7 +417,9 @@ class rcube_imap_cache } } } + unset($msg->flags); + $msg = serialize($this->db->encode($msg)); // update cache record (even if it exists, the update // here will work as select, assume row exist if affected_rows=0) -- cgit v1.2.3