fix some PHP 8 errors in calendar: in_array() Argument #2 must be of type array, null given

This commit is contained in:
Ralf Becker 2021-04-07 22:07:49 +02:00
parent dfdb300f5f
commit 2d046e2632
2 changed files with 3 additions and 3 deletions

View File

@ -1225,7 +1225,7 @@ class calendar_so
foreach(isset($data[1]) ? $data : [$data] as $key => $data) foreach(isset($data[1]) ? $data : [$data] as $key => $data)
{ {
// Skip if user turned the app off // Skip if user turned the app off
if(!in_array($data['selects'][0]['app'], $GLOBALS['egw_info']['user']['preferences']['calendar']['integration_toggle'])) if(!in_array($data['selects'][0]['app'], (array)$GLOBALS['egw_info']['user']['preferences']['calendar']['integration_toggle']))
{ {
continue; continue;
} }

View File

@ -388,7 +388,7 @@ class calendar_uiviews extends calendar_ui
'hint' => lang("video call"), 'hint' => lang("video call"),
'group' => 'integration', 'group' => 'integration',
'onExecute' => 'javaScript:app.calendar.toolbar_videocall_toggle_action', 'onExecute' => 'javaScript:app.calendar.toolbar_videocall_toggle_action',
'checked' => in_array('video_toggle', $this->cal_prefs['integration_toggle']), 'checked' => in_array('video_toggle', (array)$this->cal_prefs['integration_toggle']),
'data' => array('toggle_off' => '0', 'toggle_on' => '1') 'data' => array('toggle_off' => '0', 'toggle_on' => '1')
); );
} }
@ -423,7 +423,7 @@ class calendar_uiviews extends calendar_ui
'hint' => lang("show %1 from %2",lang(Link::get_registry($app,'entries') ?: 'entries'),lang(Link::get_registry($app,'name'))), 'hint' => lang("show %1 from %2",lang(Link::get_registry($app,'entries') ?: 'entries'),lang(Link::get_registry($app,'name'))),
'group' => 'integration', 'group' => 'integration',
'onExecute' => 'javaScript:app.calendar.toolbar_integration_action', 'onExecute' => 'javaScript:app.calendar.toolbar_integration_action',
'checked' => in_array($app,$this->cal_prefs['integration_toggle']), 'checked' => in_array($app, (array)$this->cal_prefs['integration_toggle']),
'data' => array('toggle_off' => '0', 'toggle_on' => '1') 'data' => array('toggle_off' => '0', 'toggle_on' => '1')
); );