Calendar: Avoid type error if old_event was not loaded

This commit is contained in:
nathan 2021-10-18 10:18:27 -06:00
parent 62e35cd1c7
commit c4a8996209

View File

@ -1007,7 +1007,7 @@ class calendar_uiforms extends calendar_ui
$response = Api\Json\Response::get(); $response = Api\Json\Response::get();
if($response && $update_type != 'delete' && !$client_updated) 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 : ''); $msg = $message . ($msg ? ', ' . $msg : '');