Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValdis Murzins <valdis.murzins@zabbix.com>2020-09-28 16:35:51 +0300
committerValdis Murzins <valdis.murzins@zabbix.com>2020-09-28 16:35:51 +0300
commiteae37c948e837e873bf3bca392557f0a91c8ccc5 (patch)
treec96b7853a7ee1478ec709a157d420169a23cb80b /ui/hosts.php
parent874905b0f84f14ae098b6a561072f5205049209c (diff)
..F....... [ZBXNEXT-2072] fixed validation of interface with empty IP and DNS
Diffstat (limited to 'ui/hosts.php')
-rw-r--r--ui/hosts.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/ui/hosts.php b/ui/hosts.php
index 17925da0227..6a331b0ddf4 100644
--- a/ui/hosts.php
+++ b/ui/hosts.php
@@ -743,16 +743,10 @@ elseif (hasRequest('add') || hasRequest('update')) {
$interfaces = getRequest('interfaces', []);
foreach ($interfaces as $key => $interface) {
- if ($interface['ip'] === '' && $interface['dns'] === '') {
- unset($interfaces[$key]);
- continue;
- }
-
// Proccess SNMP interface fields.
if ($interface['type'] == INTERFACE_TYPE_SNMP) {
if (!array_key_exists('details', $interface)) {
- unset($interfaces[$key]);
- continue;
+ $interface['details'] = [];
}
$interfaces[$key]['details']['bulk'] = array_key_exists('bulk', $interface['details'])