Fix error key(): Argument #1 ($array) must be of type array, null given

This commit is contained in:
Hadi Nategh 2021-06-01 16:35:34 +02:00
parent ba194038bf
commit c7d80123ce
2 changed files with 2 additions and 2 deletions

View File

@ -303,7 +303,7 @@ class calendar_uiforms extends calendar_ui
// (add, edit, update, delete)
$update_type = $content['id'] ? ($content['recur_type'] == MCAL_RECUR_NONE ? 'update' : 'edit') : 'add';
$button = @key($content['button']);
$button = @key((array)$content['button']);
if (!$button && $content['action']) $button = $content['action']; // action selectbox
unset($content['button']); unset($content['action']);

View File

@ -1781,7 +1781,7 @@ class infolog_ui
$referer = $content['referer']; unset($content['referer']);
$no_popup = $content['no_popup']; unset($content['no_popup']);
$button = @key($content['button']);
$button = @key((array)$content['button']);
if (!$button && $action) $button = $action; // action selectbox
//info_cc expects an comma separated string
//error_log(__METHOD__.__LINE__.array2string($content));