From 149cdaeae04ae0c8fc6dee66dd5cefb7f597ab0c Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 18 Oct 2021 10:18:27 -0600 Subject: [PATCH] Calendar: Avoid type error if old_event was not loaded --- calendar/inc/class.calendar_uiforms.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 015c5be07a..bedef318c8 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -1007,7 +1007,7 @@ class calendar_uiforms extends calendar_ui $response = Api\Json\Response::get(); if($response && $update_type != 'delete' && !$client_updated) { - $client_updated = $this->update_client($event['id'], null, $old_event); + $client_updated = $this->update_client($event['id'], null, is_array($old_event) ? $old_event : []); } $msg = $message . ($msg ? ', ' . $msg : '');