summaryrefslogtreecommitdiffstats
path: root/apps/contacts/ajax/contact/saveproperty.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/contacts/ajax/contact/saveproperty.php')
-rw-r--r--apps/contacts/ajax/contact/saveproperty.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/apps/contacts/ajax/contact/saveproperty.php b/apps/contacts/ajax/contact/saveproperty.php
index 9556c4a44c3..296b9ad3b77 100644
--- a/apps/contacts/ajax/contact/saveproperty.php
+++ b/apps/contacts/ajax/contact/saveproperty.php
@@ -133,17 +133,21 @@ if(!$value) {
debug('Adding parameter: '.$key);
if(is_array($parameter)) {
foreach($parameter as $val) {
- debug('Adding parameter: '.$key.'=>'.$val);
+ if(trim($val)) {
+ debug('Adding parameter: '.$key.'=>'.$val);
+ $vcard->children[$line]->add(new Sabre_VObject_Parameter(
+ $key,
+ strtoupper(strip_tags($val)))
+ );
+ }
+ }
+ } else {
+ if(trim($parameter)) {
$vcard->children[$line]->add(new Sabre_VObject_Parameter(
$key,
- strtoupper(strip_tags($val)))
+ strtoupper(strip_tags($parameter)))
);
}
- } else {
- $vcard->children[$line]->add(new Sabre_VObject_Parameter(
- $key,
- strtoupper(strip_tags($parameter)))
- );
}
}
}