Escape from read_object() early if message doesn't exist, skip type error.

This commit is contained in:
Aleksander Machniak 2012-08-20 15:54:10 +02:00
parent 47857456eb
commit 9545cc92a0

View file

@ -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;