Escape from read_object() early if message doesn't exist, skip type error.
This commit is contained in:
parent
47857456eb
commit
9545cc92a0
1 changed files with 6 additions and 0 deletions
|
@ -429,6 +429,12 @@ class kolab_storage_folder
|
|||
$this->imap->set_folder($folder);
|
||||
|
||||
$headers = $this->imap->get_message_headers($msguid);
|
||||
|
||||
// Message doesn't exist?
|
||||
if (empty($headers)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$object_type = kolab_format::mime2object_type($headers->others['x-kolab-type']);
|
||||
$content_type = kolab_format::KTYPE_PREFIX . $object_type;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue