Fix PHP8.0 (TypeError): array_diff(): Argument #2 must be of type array, null given

This commit is contained in:
Hadi Nategh 2021-11-04 15:50:48 +01:00
parent fd3b61b6af
commit 2812e35ec7

View File

@ -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!
}