diff --git a/addressbook/inc/class.addressbook_vcal.inc.php b/addressbook/inc/class.addressbook_vcal.inc.php index 8d03d3ec35..f006514afc 100644 --- a/addressbook/inc/class.addressbook_vcal.inc.php +++ b/addressbook/inc/class.addressbook_vcal.inc.php @@ -929,10 +929,8 @@ class addressbook_vcal extends addressbook_bo { if (!empty($fieldName)) { - if (is_scalar($vcardValues[$vcardKey]['values'][$fieldKey])) - { - $value = trim($vcardValues[$vcardKey]['values'][$fieldKey]); - } + $value = trim($vcardValues[$vcardKey]['values'][$fieldKey]); + if ($pref_tel && (($vcardKey == $pref_tel) || ($vcardValues[$vcardKey]['name'] == 'TEL') && ($vcardValues[$vcardKey]['value'] == $vcardValues[$pref_tel]['value'])))