From 1edc6d45086ccb29713d78022cf29b42c9bc7e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6rner?= Date: Tue, 18 Jan 2022 10:14:03 +0100 Subject: [PATCH] fixed tl_calendar_events_plus::getParentEventChoices() exception if dc is null --- CHANGELOG.md | 3 +++ dca/tl_calendar_events.php | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 604ef20..d16c3d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog All notable changes to this project will be documented in this file. +## [2.3.6] - 2022-01-18 +- Fixed: tl_calendar_events_plus::getParentEventChoices() exception if dc is null + ## [2.3.5] - 2021-12-13 - Fixed: tl_calendar_events_plus::getRooms() parameter type - Fixed: warning in tl_calendar_events_plus::getRooms() diff --git a/dca/tl_calendar_events.php b/dca/tl_calendar_events.php index 65e3669..d30fa0d 100644 --- a/dca/tl_calendar_events.php +++ b/dca/tl_calendar_events.php @@ -379,8 +379,11 @@ public function getMembers($arrOption, \DataContainer $dc) } - public function getParentEventChoices(\DataContainer $dc) + public function getParentEventChoices(\DataContainer $dc = null) { + if (null === $dc) { + return []; + } $choices = []; $query = "SELECT id, title FROM tl_calendar_events WHERE parentEvent=0 and id!=? ORDER BY title";