summaryrefslogtreecommitdiff
path: root/program/steps/mail/show.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-06-11 12:08:44 +0200
committerAleksander Machniak <alec@alec.pl>2013-06-11 12:10:10 +0200
commitacb4b71ce55f3d98f7053b7bb8fdcf3c7858fbfc (patch)
treeb33180670e4473bec32621568892502190d6ecca /program/steps/mail/show.inc
parentb9139f9f98fe994142dd3e050dac1e6ec9a24309 (diff)
Fix error when there's no writeable addressbook source (#1489162)
Conflicts: CHANGELOG
Diffstat (limited to 'program/steps/mail/show.inc')
-rw-r--r--program/steps/mail/show.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index b01989ad8..dbb6d217f 100644
--- a/program/steps/mail/show.inc
+++ b/program/steps/mail/show.inc
@@ -255,9 +255,13 @@ function rcmail_contact_exists($email)
if ($email) {
// @TODO: search in all address books?
$CONTACTS = $RCMAIL->get_address_book(-1, true);
- $existing = $CONTACTS->search('email', $email, true, false);
- if ($existing->count)
- return true;
+
+ if (is_object($CONTACTS)) {
+ $existing = $CONTACTS->search('email', $email, true, false);
+ if ($existing->count) {
+ return true;
+ }
+ }
}
return false;