mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-19 06:26:49 +01:00
Fix importing contacts with no email address (#8227)
This commit is contained in:
@@ -196,8 +196,11 @@ class rcmail_action_contacts_import extends rcmail_action_contacts_index
|
||||
}
|
||||
|
||||
// We're using UTF8 internally
|
||||
$email = $vcard->email[0];
|
||||
$email = rcube_utils::idn_to_utf8($email);
|
||||
$email = null;
|
||||
if (isset($vcard->email[0])) {
|
||||
$email = $vcard->email[0];
|
||||
$email = rcube_utils::idn_to_utf8($email);
|
||||
}
|
||||
|
||||
if (!$replace) {
|
||||
$existing = null;
|
||||
|
||||
@@ -809,6 +809,8 @@ class rcube_contacts extends rcube_addressbook
|
||||
// save all e-mails in the database column
|
||||
if (!empty($vcard->email)) {
|
||||
$out['email'] = implode(self::SEPARATOR, $vcard->email);
|
||||
} else {
|
||||
$out['email'] = isset($save_data['email']) ? $save_data['email'] : '';
|
||||
}
|
||||
|
||||
// join words for fulltext search
|
||||
|
||||
Reference in New Issue
Block a user