diff --git a/api/src/CalDAV/JsBase.php b/api/src/CalDAV/JsBase.php index d45223103a..9cba134693 100644 --- a/api/src/CalDAV/JsBase.php +++ b/api/src/CalDAV/JsBase.php @@ -236,10 +236,10 @@ class JsBase $contact['#'.$name] = null; } } - // report not existing cfs to log + // error not existing cfs if (($not_existing=array_diff(array_keys($cfs), array_keys($definitions)))) { - error_log(__METHOD__."() not existing/ignored custom fields: ".implode(', ', $not_existing)); + throw new JsParseException("Trying to update not existing custom field(s): ".implode(', ', $not_existing)); } return $contact; } diff --git a/api/src/CalDAV/JsCalendar.php b/api/src/CalDAV/JsCalendar.php index 0125b87bf4..d9353d39d2 100644 --- a/api/src/CalDAV/JsCalendar.php +++ b/api/src/CalDAV/JsCalendar.php @@ -110,8 +110,8 @@ class JsCalendar extends JsBase return strpos($key, '/') !== false; })) { - // apply patch on JsCard of contact - $data = self::patch($data, $old ? self::getJsCalendar($old, false) : [], !$old); + // apply patch on JsEvent + $data = self::patch($data, $old ? self::getJsCalendar($old, false) : [], !$old || !$strict); } if (!isset($data['uid'])) $data['uid'] = null; // to fail below, if it does not exist diff --git a/api/src/Contacts/JsContact.php b/api/src/Contacts/JsContact.php index 4d5fda4c69..6c79233a62 100644 --- a/api/src/Contacts/JsContact.php +++ b/api/src/Contacts/JsContact.php @@ -104,7 +104,7 @@ class JsContact extends Api\CalDAV\JsBase })) { // apply patch on JsCard of contact - $data = self::patch($data, $old ? self::getJsCard($old, false) : [], !$old); + $data = self::patch($data, $old ? self::getJsCard($old, false) : [], !$old || !$strict); } if (!isset($data['uid'])) $data['uid'] = null; // to fail below, if it does not exist @@ -188,7 +188,7 @@ class JsContact extends Api\CalDAV\JsBase break; case 'egroupware.org:customfields': - $contact += self::parseCustomfields($value, $strict); + $contact += self::parseCustomfields($value); break; case 'egroupware.org:assistant':