From 1ccbc605871a6d2e35908e7dc84985d488535556 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 16 Nov 2021 11:23:03 +0100 Subject: [PATCH] Fix PHP8.0 (TypeError): key(): Argument #1 ($array) must be of type array, null given --- mail/inc/class.mail_acl.inc.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mail/inc/class.mail_acl.inc.php b/mail/inc/class.mail_acl.inc.php index c858d47245..af35e1d28e 100644 --- a/mail/inc/class.mail_acl.inc.php +++ b/mail/inc/class.mail_acl.inc.php @@ -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)