summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG3
-rw-r--r--program/include/rcmail.php5
-rw-r--r--program/steps/mail/show.inc10
3 files changed, 14 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 0492116e7..15b513464 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,9 +1,10 @@
CHANGELOG Roundcube Webmail
===========================
-- Fix "null" instead of empty string on messages list in IE10 (#1489145)
+- Fix error when there's no writeable addressbook source (#1489162)
- Fix zipdownload plugin issue with filenames charset (#1489156)
- Fix so non-inline images aren't skipped on forward (#1489150)
+- Fix "null" instead of empty string on messages list in IE10 (#1489145)
- Fix legacy options handling
- Fix so bounces addresses in Sender headers are skipped on Reply-All (#1489011)
- Fix bug where serialized strings were truncated in PDO::quote() (#1489142)
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index c35c24f8c..19a89b84c 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -228,6 +228,11 @@ class rcmail extends rcube
}
if (!$contacts) {
+ // there's no default, just return
+ if ($default) {
+ return null;
+ }
+
self::raise_error(array(
'code' => 700, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
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;