Skip to content
Snippets Groups Projects
Unverified Commit 83cfb338 authored by Christoph Wurst's avatar Christoph Wurst
Browse files

Fix deserialization of null values

parent 850e4058
No related branches found
No related tags found
No related merge requests found
......@@ -377,7 +377,9 @@ class Cache extends Horde_Imap_Client_Cache_Backend {
if (($data = $this->_cache->get($cache_id, 0)) !== false) {
try {
$data = @unserialize($data);
if (is_string($data)) {
$data = @unserialize($data);
}
} catch (Exception $e) {
}
}
......@@ -411,7 +413,8 @@ class Cache extends Horde_Imap_Client_Cache_Backend {
if (!isset($this->_slicemap[$mailbox]) &&
(($data = $this->_cache->get($this->_getCid($mailbox, 'slicemap'), 0)) !== false)) {
try {
if (($slice = @unserialize($data)) &&
if (is_string($data) &&
($slice = @unserialize($data)) &&
is_array($slice)) {
$this->_slicemap[$mailbox] = $slice;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment