Skip to content

Commit

Permalink
check for existing userinfo if settings are being imported via cli
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Kaufmann <[email protected]>
  • Loading branch information
d00p committed Sep 2, 2023
1 parent 4b75369 commit 37aa7af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Froxlor/Domain/IpAddr.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public static function getIpAddresses(): array

/**
* @return array
* @throws \Exception
*/
public static function getSslIpPortCombinations(): array
{
Expand All @@ -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)
");
Expand Down

0 comments on commit 37aa7af

Please sign in to comment.