Skip to content

Commit b3ae079

Browse files
committed
edge case empty memberuid
1 parent 4d591ab commit b3ae079

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

resources/lib/UnityLDAP.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,13 @@ public function getQualifiedUID2PIGIDs(): array
350350
$uids = $this->getQualifiedUsersUIDs();
351351
$uid2pigids = array_combine($uids, array_fill(0, count($uids), []));
352352
// for each PI group, append that GID to the member list for each of its member UIDs
353-
foreach ($this->getAllPIGroupsAttributes(["cn", "memberuid"]) as $array) {
353+
foreach (
354+
$this->getAllPIGroupsAttributes(
355+
["cn", "memberuid"],
356+
default_values: ["memberuid" => []],
357+
)
358+
as $array
359+
) {
354360
$gid = $array["cn"][0];
355361
foreach ($array["memberuid"] as $uid) {
356362
if (array_key_exists($uid, $uid2pigids)) {

0 commit comments

Comments
 (0)