diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-02-21 07:00:28 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-02-21 07:00:28 +0000 |
| commit | e861c76ffa4c12c8b3a9dd79585bf4297c989c89 (patch) | |
| tree | 98be2fc9e368ec4dc0d21c872f8f952bd280695a | |
| parent | 4511272cd09af9506e9c65cc253918712142aabb (diff) | |
check if event is actually in any calendars, fixes #5266
Closes #5266
Merge request studip/studip!3949
| -rw-r--r-- | lib/models/ConsultationEvent.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/models/ConsultationEvent.php b/lib/models/ConsultationEvent.php index fe8a405..4194f6a 100644 --- a/lib/models/ConsultationEvent.php +++ b/lib/models/ConsultationEvent.php @@ -32,6 +32,10 @@ class ConsultationEvent extends SimpleORMap $config['registered_callbacks'] = [ 'before_delete' => [ function (ConsultationEvent $event) { + if (!isset($event->event->calendars)) { + return; + } + // Suppress all mails from calendar for users that do not // want to receive emails about consultation bookings $event->event->calendars->each(function (CalendarDateAssignment $assignment) { |
