Fix PHP8.0 (TypeError): key(): Argument #1 ($array) must be of type array, null given

This commit is contained in:
Hadi Nategh 2021-11-16 11:23:03 +01:00
parent 3803cbd133
commit dd1b868be3

View File

@ -205,11 +205,7 @@ class mail_acl
}
else
{
$button = @key($content['button']);
if (!empty ($content['grid']['delete']))
{
$button = 'delete';
}
$button = !empty ($content['grid']['delete']) ? 'delete' : @key((array)$content['button']);
$data = $content;
$data['mailbox'] = self::_extract_mailbox($content['mailbox'], $acc_id);
switch ($button)