Skip to content

Commit

Permalink
Add case for null $caldav_event
Browse files Browse the repository at this point in the history
  • Loading branch information
alextselegidis committed Dec 18, 2024
1 parent c8aef54 commit 0522e67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/controllers/Caldav.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public static function sync(string $provider_id): void
try {
$caldav_event = $CI->caldav_sync->get_event($provider, $local_event['id_caldav_calendar']);

if ($caldav_event['status'] === 'CANCELLED') {
if (!$caldav_event || $caldav_event['status'] === 'CANCELLED') {
throw new Exception('Event is cancelled, remove the record from Easy!Appointments.');
}

Expand Down

0 comments on commit 0522e67

Please sign in to comment.