From 2e273a41b51e35eb8c95a1c6f4a71238abdf8e42 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Sun, 19 Jan 2020 10:45:48 +0100 Subject: [PATCH] fix IpsAndPorts when checking for system.ipaddress in update() and delete() Signed-off-by: Michael Kaufmann --- lib/Froxlor/Api/Commands/IpsAndPorts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Froxlor/Api/Commands/IpsAndPorts.php b/lib/Froxlor/Api/Commands/IpsAndPorts.php index 3759c6b9..2e690833 100644 --- a/lib/Froxlor/Api/Commands/IpsAndPorts.php +++ b/lib/Froxlor/Api/Commands/IpsAndPorts.php @@ -462,7 +462,7 @@ class IpsAndPorts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour $docroot = ''; } - if ($result['ip'] != $ip && $result['ip'] == Settings::Get('system.ipaddress') && ($result_sameipotherport && $result_sameipotherport['id'] == '')) { + if ($result['ip'] != $ip && $result['ip'] == Settings::Get('system.ipaddress') && $result_sameipotherport == false) { \Froxlor\UI\Response::standard_error('cantchangesystemip', '', true); } elseif ($result_checkfordouble && $result_checkfordouble['id'] != '' && $result_checkfordouble['id'] != $id) { \Froxlor\UI\Response::standard_error('myipnotdouble', '', true); @@ -560,7 +560,7 @@ class IpsAndPorts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour 'ip' => $result['ip'] )); - if (($result['ip'] != Settings::Get('system.ipaddress')) || ($result['ip'] == Settings::Get('system.ipaddress') && ($result_sameipotherport && $result_sameipotherport['id'] != ''))) { + if (($result['ip'] != Settings::Get('system.ipaddress')) || ($result['ip'] == Settings::Get('system.ipaddress') && $result_sameipotherport == false)) { $del_stmt = Database::prepare(" DELETE FROM `" . TABLE_PANEL_IPSANDPORTS . "`