diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-09-10 15:34:02 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-09-10 15:34:02 +0200 |
commit | 6b87f8e023011e1f10c899d1d1d27f8309ceda52 (patch) | |
tree | 67001adea88d69ad140af1c31560a6b5c5be88f3 /program/steps/addressbook/save.inc | |
parent | bdb42766888404cda7f7e0adbf25c4eee3ed9523 (diff) |
Fix for case when email array is not flat
Diffstat (limited to 'program/steps/addressbook/save.inc')
-rw-r--r-- | program/steps/addressbook/save.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc index e7e5efc63..bd6c14bca 100644 --- a/program/steps/addressbook/save.inc +++ b/program/steps/addressbook/save.inc @@ -75,8 +75,10 @@ foreach ($GLOBALS['CONTACT_COLTYPES'] as $col => $colprop) { if (empty($a_record['name'])) { $a_record['name'] = rcube_addressbook::compose_display_name($a_record, true); // Reset it if equals to email address (from compose_display_name()) - if ($a_record['name'] == $a_record['email'][0]) + $email = rcube_addressbook::get_col_values('email', $a_record, true); + if ($a_record['name'] == $email[0]) { $a_record['name'] = ''; + } } // do input checks (delegated to $CONTACTS instance) |