Fix php8.0 (TypeError): Cannot access offset of type string on string

This commit is contained in:
Hadi Nategh 2021-11-12 15:09:19 +01:00
parent 392a27b77c
commit 77aa807036

View File

@ -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',