Avoid PHP errors

This commit is contained in:
Thomas 2011-09-05 23:05:52 +02:00
parent 551fe7db2b
commit 41dd3a5f3b

View file

@ -201,7 +201,7 @@ class rcube_kolab
if (!$subscribed) { if (!$subscribed) {
$rcmail = rcmail::get_instance(); $rcmail = rcmail::get_instance();
// try without connection first (list could be served from cache) // try without connection first (list could be served from cache)
$subscribed = $rcmail->imap->list_mailboxes(); $subscribed = $rcmail->imap ? $rcmail->imap->list_mailboxes() : array();
// now really get the list from the IMAP server // now really get the list from the IMAP server
if (empty($subscribed) || $subscribed == array('INBOX')) { if (empty($subscribed) || $subscribed == array('INBOX')) {