From 37aa7af4da7916eeea93bce4b0d8f7caa22f2f14 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Sat, 2 Sep 2023 17:11:06 +0200 Subject: [PATCH] check for existing userinfo if settings are being imported via cli Signed-off-by: Michael Kaufmann --- lib/Froxlor/Domain/IpAddr.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Froxlor/Domain/IpAddr.php b/lib/Froxlor/Domain/IpAddr.php index 1c6f5cdffb..c53eeac70f 100644 --- a/lib/Froxlor/Domain/IpAddr.php +++ b/lib/Froxlor/Domain/IpAddr.php @@ -55,6 +55,7 @@ public static function getIpAddresses(): array /** * @return array + * @throws \Exception */ public static function getSslIpPortCombinations(): array { @@ -75,7 +76,7 @@ public static function getIpPortCombinations(bool $ssl = false): array $additional_conditions_params = []; $additional_conditions_array = []; - if ($userinfo['ip'] != '-1') { + if (!empty($userinfo) && $userinfo['ip'] != '-1') { $admin_ip_stmt = Database::prepare(" SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = IN (:ipid) ");