Fix error when there's no writeable addressbook source (#1489162)

pull/80/merge
Aleksander Machniak 11 years ago
parent c6406eb1a9
commit ae80b5a309

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Fix error when there's no writeable addressbook source (#1489162)
- Add option show_real_foldernames to disable localization of special folders
- Fix zipdownload plugin issue with filenames charset (#1489156)
- Fix database cache expunge issues (#1489149)

@ -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__,

@ -275,9 +275,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;

Loading…
Cancel
Save