summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-08-27 08:33:35 +0000
committeralecpl <alec@alec.pl>2011-08-27 08:33:35 +0000
commit9a835c7f7ca3b2e1e021840254a15b0205388dfc (patch)
tree3bbfa9d683c6ba2c958bdf1f24b39749dbb62b64 /program/include/rcmail.php
parent20ed3794f69fb3551622fe17830493f5feff6ba9 (diff)
- Fix is_a() usage for PHP>5.3.6
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r--program/include/rcmail.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index c6f8a6340..7967f942f 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -393,7 +393,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]) {
@@ -1163,7 +1166,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();
}