diff options
Diffstat (limited to 'apps/dav/lib/CardDAV/AddressBookImpl.php')
-rw-r--r-- | apps/dav/lib/CardDAV/AddressBookImpl.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/apps/dav/lib/CardDAV/AddressBookImpl.php b/apps/dav/lib/CardDAV/AddressBookImpl.php index a2895fed34a..e270b579e1f 100644 --- a/apps/dav/lib/CardDAV/AddressBookImpl.php +++ b/apps/dav/lib/CardDAV/AddressBookImpl.php @@ -150,13 +150,17 @@ class AddressBookImpl implements IAddressBook { if (is_array($value)) { $vCard->remove($key); foreach ($value as $entry) { - if (($key === "ADR" || $key === "PHOTO") && is_string($entry["value"])) { - $entry["value"] = stripslashes($entry["value"]); - $entry["value"] = explode(';', $entry["value"]); - } - $property = $vCard->createProperty($key, $entry["value"]); - if (isset($entry["type"])) { - $property->add('TYPE', $entry["type"]); + if (is_string($entry)) { + $property = $vCard->createProperty($key, $entry); + } else { + if (($key === "ADR" || $key === "PHOTO") && is_string($entry["value"])) { + $entry["value"] = stripslashes($entry["value"]); + $entry["value"] = explode(';', $entry["value"]); + } + $property = $vCard->createProperty($key, $entry["value"]); + if (isset($entry["type"])) { + $property->add('TYPE', $entry["type"]); + } } $vCard->add($property); } |