From dd42733393f7ef97e2006dc130f25dd3cbd2fe6c Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 4 Nov 2021 15:50:48 +0100 Subject: [PATCH] Fix PHP8.0 (TypeError): array_diff(): Argument #2 must be of type array, null given --- admin/inc/class.admin_acl.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/inc/class.admin_acl.inc.php b/admin/inc/class.admin_acl.inc.php index b66175563b..5d40e2515d 100644 --- a/admin/inc/class.admin_acl.inc.php +++ b/admin/inc/class.admin_acl.inc.php @@ -193,7 +193,7 @@ class admin_acl } else { - $check = array_diff($memberships, $groups); + $check = array_diff($memberships, (array)$groups); //error_log(__METHOD__."() app=$app, array_diff(memberships=".array2string($memberships).", groups=".array2string($groups).")=".array2string($check)); if (!$check) continue; // would give sql error otherwise! }