From c004590e31786e09a17cfc784588edfdff69e2f2 Mon Sep 17 00:00:00 2001 From: Marcus Schwemer Date: Wed, 13 Mar 2024 12:09:09 +0100 Subject: [PATCH] [BUGFIX] Avoid 'Undefined array key "uid"' In case a new group is imported, the group uid is not set. Setting it to `0` in this case prevents the issue. --- Classes/Controller/ModuleController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Controller/ModuleController.php b/Classes/Controller/ModuleController.php index 323f836f..bd684936 100644 --- a/Classes/Controller/ModuleController.php +++ b/Classes/Controller/ModuleController.php @@ -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