From db5533058d05055b9078cdb9effa7f0f207b5a61 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 29 Mar 2016 09:12:56 +0000 Subject: [PATCH] possible fix for An error happened (ErrorException): Argument 2 passed to EGroupware\Api\Etemplate::exec() must be of the type array, string given, called in calendar/inc/class.calendar_ui.inc.php on line 593 --- calendar/inc/class.calendar_ui.inc.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/calendar/inc/class.calendar_ui.inc.php b/calendar/inc/class.calendar_ui.inc.php index 4a1c21303a..f874ac7f8d 100644 --- a/calendar/inc/class.calendar_ui.inc.php +++ b/calendar/inc/class.calendar_ui.inc.php @@ -555,9 +555,10 @@ class calendar_ui } $sidebox = new etemplate_new('calendar.sidebox'); - $content = $this->cal_prefs['saved_states']; - $content['view'] = $this->view ? $this->view : 'week'; - $content['date'] = $this->date ? $this->date : egw_time(); + $cont = $this->cal_prefs['saved_states']; + if (!is_array($cont)) $cont = array(); + $cont['view'] = $this->view ? $this->view : 'week'; + $cont['date'] = $this->date ? $this->date : egw_time(); $readonlys = array(); $sel_options['status_filter'] = array( @@ -590,7 +591,7 @@ class calendar_ui } // Sidebox? - $sidebox->exec('calendar.calendar_ui.sidebox_etemplate', $content, $sel_options, $readonlys); + $sidebox->exec('calendar.calendar_ui.sidebox_etemplate', $cont, $sel_options, $readonlys); } /**