summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Kolab/CardDAV/ContactsBackend.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Kolab/CardDAV/ContactsBackend.php b/lib/Kolab/CardDAV/ContactsBackend.php
index b9f0ff8..c9ff807 100644
--- a/lib/Kolab/CardDAV/ContactsBackend.php
+++ b/lib/Kolab/CardDAV/ContactsBackend.php
@@ -684,7 +684,10 @@ class ContactsBackend extends CardDAV\Backend\AbstractBackend
$vc->add('X-CHILDREN', join(',', (array)$contact['children']));
foreach ((array)$contact['email'] as $email) {
- $vc->add('EMAIL', $email['address'], array('type' => rtrim('INTERNET,' . strtoupper($email['type']), ',')));
+ $vemail = VObject\Property::create('EMAIL', $email['address'], array('type' => 'INTERNET'));
+ if (!empty($email['type']))
+ $vemail->offsetSet(null, new VObject\Parameter('type', strtoupper($email['type'])));
+ $vc->add($vemail);
}
foreach ((array)$contact['phone'] as $phone) {