From 435133adf56e21392b4e37b399248ff498fed9b8 Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Sat, 20 Jan 2024 16:42:30 +1300 Subject: [PATCH] We need to have dtstart_orig be what is passed in, possibly empty. Using quote_dt_param resolves the error that Benedikt Spranger was fixing in 3f326f2d3fcc429d7596a4ff59970217161f7930. --- inc/caldav-PUT-functions.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/inc/caldav-PUT-functions.php b/inc/caldav-PUT-functions.php index dbf21dca..214e980b 100644 --- a/inc/caldav-PUT-functions.php +++ b/inc/caldav-PUT-functions.php @@ -1492,12 +1492,11 @@ function write_resource( DAVResource $resource, $caldav_data, DAVResource $colle if ( $first->GetType() == 'VTODO' ) $due = $first->GetPValue('DUE'); $calitem_params[':due'] = $due; $dtstart = $first->GetPValue('DTSTART'); - $calitem_params[':dtstart_orig'] = $dtstart; + $calitem_params[':dtstart_orig'] = quote_dt_param($dtstart); if ( empty($dtstart) ) $dtstart = $due; if (isset($dtstart) && preg_match("/^1[0-8][0-9][0-9][01][0-9][0-3][0-9]$/", $dtstart)) { $dtstart = $dtstart . "T000000Z"; - $calitem_params[':dtstart_orig'] = $dtstart; } $calitem_params[':dtstart'] = quote_dt_param($dtstart); @@ -1508,7 +1507,6 @@ function write_resource( DAVResource $resource, $caldav_data, DAVResource $colle dbg_error_log( 'PUT', ' DTEND: "%s", DTSTART: "%s", DURATION: "%s"', $dtend, $dtstart, $first->GetPValue('DURATION') ); if (preg_match("/^1[0-8][0-9][0-9][01][0-9][0-3][0-9]$/", $dtend)) { $dtend = $dtend . "T000000Z"; - $calitem_params[':dtend_orig'] = $dtend; } $calitem_params[':dtend'] = quote_dt_param($dtend); $dtend = ':dtend';