Skip to content

Commit

Permalink
[BUGFIX] Avoid 'Undefined array key "uid"'
Browse files Browse the repository at this point in the history
In case a new group is imported, the group uid is not set.
Setting it to `0` in this case prevents the issue.
  • Loading branch information
mschwemer committed Mar 13, 2024
1 parent d8127bd commit ab26c48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Controller/ModuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ public function ajaxGroupsImport(ServerRequestInterface $request): ResponseInter
// Merge LDAP and TYPO3 information
$group = Authentication::merge($ldapGroup, $typo3Groups[0], $config['groups']['mapping']);

if ((int)$group['uid'] === 0) {
if ((int)($group['uid'] ?? 0) === 0) {
$group = Typo3GroupRepository::add($table, $group);
} else {
// Restore group that may have been previously deleted
Expand Down

0 comments on commit ab26c48

Please sign in to comment.