From 77aa807036263de63233886b85869c6c96ddbf1d Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 12 Nov 2021 15:09:19 +0100 Subject: [PATCH] Fix php8.0 (TypeError): Cannot access offset of type string on string --- calendar/inc/class.calendar_uiviews.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_uiviews.inc.php b/calendar/inc/class.calendar_uiviews.inc.php index b26c34dcae..10e68c215c 100644 --- a/calendar/inc/class.calendar_uiviews.inc.php +++ b/calendar/inc/class.calendar_uiviews.inc.php @@ -345,7 +345,7 @@ class calendar_uiviews extends calendar_ui 'caption' => 'Weekend', 'icon' => '7_day_view', 'checkbox' => true, - 'checked' => $this->cal_prefs['saved_states']['weekend'], + 'checked' => is_array($this->cal_prefs['saved_states']) ? $this->cal_prefs['saved_states']['weekend']:false, 'group' => $group, 'onExecute' => 'javaScript:app.calendar.toolbar_action', 'hint' => 'Toggle weekend',