diff --git a/src/LdapSyncCommand.php b/src/LdapSyncCommand.php index 0c125d6..87af9c3 100644 --- a/src/LdapSyncCommand.php +++ b/src/LdapSyncCommand.php @@ -1499,7 +1499,7 @@ private function deployGitlabUsersAndGroups(array $config, string $gitlabInstanc continue; } - if ("" !== $usersSync["new"][$gitlabUserId]) { + if (isset($usersSync["new"][$gitlabUserId]) && "" !== $usersSync["new"][$gitlabUserId]) { continue; } @@ -1772,7 +1772,10 @@ private function deployGitlabUsersAndGroups(array $config, string $gitlabInstanc // Update groups of which were already in both Gitlab and the directory $this->logger?->notice("Updating groups of which were already in both Gitlab and the directory..."); foreach ($groupsSync["found"] as $gitlabGroupId => $gitlabGroupName) { - if ("" !== $groupsSync["new"][$gitlabGroupId] || "" !== $groupsSync["extra"][$gitlabGroupId]) { + if ( + (isset($groupsSync["new"][$gitlabGroupId]) && "" !== $groupsSync["new"][$gitlabGroupId]) + || (isset($groupsSync["extra"][$gitlabGroupId]) && "" !== $groupsSync["extra"][$gitlabGroupId]) + ) { continue; }