From b08caf5813c43e8648cdf5db1e003b3046a37c2c Mon Sep 17 00:00:00 2001 From: alecpl Date: Wed, 31 Aug 2011 12:49:44 +0000 Subject: - Applied fixes from trunk up to r5150 --- program/include/rcmail.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'program/include/rcmail.php') diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 1e13624d7..03b536b3e 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -413,7 +413,10 @@ class rcmail $id = '0'; // use existing instance - if (isset($this->address_books[$id]) && is_a($this->address_books[$id], 'rcube_addressbook') && (!$writeable || !$this->address_books[$id]->readonly)) { + if (isset($this->address_books[$id]) && is_object($this->address_books[$id]) + && is_a($this->address_books[$id], 'rcube_addressbook') + && (!$writeable || !$this->address_books[$id]->readonly) + ) { $contacts = $this->address_books[$id]; } else if ($id && $ldap_config[$id]) { @@ -1183,7 +1186,7 @@ class rcmail $this->smtp->disconnect(); foreach ($this->address_books as $book) { - if (is_a($book, 'rcube_addressbook')) + if (is_object($book) && is_a($book, 'rcube_addressbook')) $book->close(); } -- cgit v1.2.3