summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--program/include/rcmail.php7
-rw-r--r--program/include/rcube_plugin_api.php2
-rw-r--r--program/steps/mail/func.inc2
3 files changed, 7 insertions, 4 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();
}
diff --git a/program/include/rcube_plugin_api.php b/program/include/rcube_plugin_api.php
index cfba7fa78..0e38a3101 100644
--- a/program/include/rcube_plugin_api.php
+++ b/program/include/rcube_plugin_api.php
@@ -176,7 +176,7 @@ class rcube_plugin_api
if (is_subclass_of($plugin, 'rcube_plugin')) {
// ... task, request type and framed mode
if ((!$plugin->task || preg_match('/^('.$plugin->task.')$/i', $rcmail->task))
- && (!$plugin->noajax || is_a($rcmail->output, 'rcube_template'))
+ && (!$plugin->noajax || (is_object($rcmail->output) && is_a($rcmail->output, 'rcube_template')))
&& (!$plugin->noframe || empty($_REQUEST['_framed']))
) {
$plugin->init();
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 50de7108d..ae0d3a55c 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1451,7 +1451,7 @@ function rcmail_send_mdn($message, &$smtp_error)
{
global $RCMAIL, $IMAP;
- if (!is_a($message, rcube_message))
+ if (!is_object($message) || !is_a($message, rcube_message))
$message = new rcube_message($message);
if ($message->headers->mdn_to && !$message->headers->mdn_sent &&