From cb106cf4f9724e4807d0b8f241148da50a175c5b Mon Sep 17 00:00:00 2001 From: nicorac Date: Tue, 18 Dec 2018 16:20:01 +0100 Subject: [PATCH] Fixed attributes cleanup in calendar_groupdav.post() and calendar_groupdav.put() --- calendar/inc/class.calendar_groupdav.inc.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/calendar/inc/class.calendar_groupdav.inc.php b/calendar/inc/class.calendar_groupdav.inc.php index 6435b69af4..559dbda008 100644 --- a/calendar/inc/class.calendar_groupdav.inc.php +++ b/calendar/inc/class.calendar_groupdav.inc.php @@ -869,12 +869,11 @@ class calendar_groupdav extends Api\CalDAV\Handler array_shift($content_type); foreach ($content_type as $attribute) { - trim($attribute); list($key, $value) = explode('=', $attribute); - switch (strtolower($key)) + switch (strtolower(trim($key))) { case 'charset': - $charset = strtoupper(substr($value,1,-1)); + $charset = strtoupper(trim($value)); } } } @@ -1078,12 +1077,11 @@ class calendar_groupdav extends Api\CalDAV\Handler array_shift($content_type); foreach ($content_type as $attribute) { - trim($attribute); list($key, $value) = explode('=', $attribute); - switch (strtolower($key)) + switch (strtolower(trim($key))) { case 'charset': - $charset = strtoupper(substr($value,1,-1)); + $charset = strtoupper(trim($value)); } } }