Skip to content

Commit

Permalink
fixed tl_calendar_events_plus::getParentEventChoices() exception if d…
Browse files Browse the repository at this point in the history
…c is null
  • Loading branch information
koertho committed Jan 18, 2022
1 parent bacbc11 commit 1edc6d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
5 changes: 4 additions & 1 deletion dca/tl_calendar_events.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 1edc6d4

Please sign in to comment.