From 2645c25a71b766b47aed0d3b9f177d57c966e61e Mon Sep 17 00:00:00 2001 From: Gregory Chalenko Date: Mon, 12 Oct 2020 11:56:26 +0300 Subject: ..F....... [ZBXNEXT-710] fixed javascript error on initial dynamic rows render when first element is empty --- ui/app/controllers/CControllerHost.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ui/app/controllers/CControllerHost.php') diff --git a/ui/app/controllers/CControllerHost.php b/ui/app/controllers/CControllerHost.php index f7ed03b47da..ac7020047c2 100644 --- a/ui/app/controllers/CControllerHost.php +++ b/ui/app/controllers/CControllerHost.php @@ -300,8 +300,11 @@ abstract class CControllerHost extends CController { $input['tags'] = array_filter($input['tags'], function($tag) { return !($tag['tag'] === '' && $tag['value'] === ''); }); + $input['tags'] = array_values($input['tags']); } + $input += ['severities' => []]; + return $input; } } -- cgit v1.2.3