From 6bd905158987b1024dc3446017783c2f681b920e Mon Sep 17 00:00:00 2001 From: ralf Date: Tue, 26 Apr 2022 11:29:39 +0200 Subject: [PATCH] fix PHP 8.x TypeError: array_intersect(): Argument #2 must be of type array, null given --- mail/inc/class.mail_acl.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mail/inc/class.mail_acl.inc.php b/mail/inc/class.mail_acl.inc.php index af35e1d28e..8c82df3edd 100644 --- a/mail/inc/class.mail_acl.inc.php +++ b/mail/inc/class.mail_acl.inc.php @@ -171,8 +171,8 @@ class mail_acl $content['grid'][$n]['acl_'. $right] = true; } $virtualD = array('e','t'); - $content['grid'][$n]['acl_c'] = array_diff($virtuals['c'],array_intersect($rights,$virtuals['c']))? false: true; //c=kx more information rfc4314, Obsolote Rights - $content['grid'][$n]['acl_d'] = array_diff($virtualD,array_intersect($rights,$virtuals['d']))? false: true; //d=et more information rfc4314, Obsolote Rights + $content['grid'][$n]['acl_c'] = array_diff($virtuals['c'],array_intersect($rights, $virtuals['c'] ?? []))? false: true; //c=kx more information rfc4314, Obsolete Rights + $content['grid'][$n]['acl_d'] = array_diff($virtualD,array_intersect($rights,$virtuals['d'] ?? []))? false: true; //d=et more information rfc4314, Obsolete Rights sort($rights); $acl_abbrvs = implode('',$rights); @@ -599,4 +599,4 @@ class mail_acl $mailbox = is_array($mailbox) ? $mailbox[0] : $mailbox; return preg_replace("/^".$acc_id."::/",'', $mailbox); } -} +} \ No newline at end of file