From 01352cf6c29b3d3d21c5a452d23e7b267da3924b Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Wed, 16 Aug 2023 11:02:57 +0200 Subject: [PATCH] AdminAccountPage: Fix `Variable '$groups, $users' are probably undefined` --- modules/setup/application/forms/AdminAccountPage.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/setup/application/forms/AdminAccountPage.php b/modules/setup/application/forms/AdminAccountPage.php index f18b1c4ab..97f0e96fd 100644 --- a/modules/setup/application/forms/AdminAccountPage.php +++ b/modules/setup/application/forms/AdminAccountPage.php @@ -101,6 +101,7 @@ class AdminAccountPage extends Form public function createElements(array $formData) { $choices = array(); + $groups = []; if ($this->backendConfig['backend'] !== 'db') { $choices['by_name'] = $this->translate('By Name', 'setup.admin'); $choice = isset($formData['user_type']) ? $formData['user_type'] : 'by_name'; @@ -116,6 +117,7 @@ class AdminAccountPage extends Form $choice = isset($formData['user_type']) ? $formData['user_type'] : 'new_user'; } + $users = []; if (in_array($this->backendConfig['backend'], array('db', 'ldap', 'msldap'))) { $users = $this->fetchUsers(); if (! empty($users)) {