summaryrefslogtreecommitdiff
path: root/program/lib
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-06-02 11:55:46 +0200
committerAleksander Machniak <alec@alec.pl>2013-06-02 11:57:37 +0200
commitd77e08729b812333bc22680c4072a6e41f4ba40e (patch)
tree59a593b2bd4c66e4e3dca72777bba1e2d7859779 /program/lib
parent15482bcadef86676864f7d498dc54f7c6a85c524 (diff)
Fix removing flags from serialized object before saving it in DB
Diffstat (limited to 'program/lib')
-rw-r--r--program/lib/Roundcube/rcube_imap_cache.php4
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 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)