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 cbe32069c2
commit 149cdaeae0

View File

@ -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 : '');