From 5ab4071542b7bac1e1fc3456933df4d6e4d5b8ad Mon Sep 17 00:00:00 2001 From: Thomas B Date: Thu, 22 Mar 2012 20:22:26 +0100 Subject: [PATCH] More state checks --- plugins/kolab_addressbook/lib/rcube_kolab_contacts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php b/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php index 58ba389d..30a8ebd5 100644 --- a/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php +++ b/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php @@ -111,7 +111,7 @@ class rcube_kolab_contacts extends rcube_addressbook // fetch objects from the given IMAP folder $this->storagefolder = kolab_storage::get_folder($this->imap_folder); - $this->ready = !PEAR::isError($this->storagefolder); + $this->ready = $this->storagefolder && !PEAR::isError($this->storagefolder); // Set readonly and editable flags according to folder permissions if ($this->ready) { @@ -164,7 +164,7 @@ class rcube_kolab_contacts extends rcube_addressbook */ public function get_namespace() { - if ($this->namespace === null) { + if ($this->namespace === null && $this->ready) { $this->namespace = $this->storagefolder->get_namespace(); }