diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-06-02 11:55:46 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-06-02 11:55:46 +0200 |
commit | 6213c6a6e18848d861f2add83bdb69a1de3f5956 (patch) | |
tree | 59af658c19668f57b3a7369ec113fef93d90e6bf /program | |
parent | 1fe7d6ad75d2a5a2ab72a24de8cd8cdb341cff0e (diff) |
Fix removing flags from serialized object before saving it in DB
Diffstat (limited to 'program')
-rw-r--r-- | program/lib/Roundcube/rcube_imap_cache.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_imap_cache.php b/program/lib/Roundcube/rcube_imap_cache.php index 748474af2..89e3ceb6f 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) |