diff --git a/src/Resources/contao/dca/tl_calendar_events.php b/src/Resources/contao/dca/tl_calendar_events.php index 7e39f97b60..565c844516 100644 --- a/src/Resources/contao/dca/tl_calendar_events.php +++ b/src/Resources/contao/dca/tl_calendar_events.php @@ -994,8 +994,15 @@ public function toggleVisibility($intId, $blnVisible) { foreach ($GLOBALS['TL_DCA']['tl_calendar_events']['fields']['published']['save_callback'] as $callback) { - $this->import($callback[0]); - $blnVisible = $this->$callback[0]->$callback[1]($blnVisible, $this); + if (is_array($callback)) + { + $this->import($callback[0]); + $blnVisible = $this->$callback[0]->$callback[1]($blnVisible, $this); + } + elseif (is_callable($callback)) + { + $blnVisible = $callback($blnVisible, $this); + } } }