diff options
author | Gregory Chalenko <gregory.chalenko@zabbix.com> | 2020-09-25 11:20:17 +0300 |
---|---|---|
committer | Gregory Chalenko <gregory.chalenko@zabbix.com> | 2020-09-25 11:20:17 +0300 |
commit | add3beeb989b4bb523c26c9e1fe0b6c5a6c2e443 (patch) | |
tree | 744835018d41df72949bda42d07bac2a003b81f5 /ui/app/controllers | |
parent | 2734648bbbb3ee647dcc33e5764744c6fc9b53d3 (diff) |
..F....... [ZBXNEXT-710] fixed tag filtration, keep tags having or tag or value
Diffstat (limited to 'ui/app/controllers')
-rw-r--r-- | ui/app/controllers/CControllerHost.php | 2 | ||||
-rw-r--r-- | ui/app/controllers/CControllerProblem.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ui/app/controllers/CControllerHost.php b/ui/app/controllers/CControllerHost.php index f07dbe47801..fa2e2463f5e 100644 --- a/ui/app/controllers/CControllerHost.php +++ b/ui/app/controllers/CControllerHost.php @@ -364,7 +364,7 @@ abstract class CControllerHost extends CController { protected function cleanInput(array $input): array { if (array_key_exists('tags', $input) && $input['tags']) { $input['tags'] = array_filter($input['tags'], function($tag) { - return $tag['tag'] !== '' && $tag['value'] !== ''; + return !($tag['tag'] === '' && $tag['value'] === ''); }); } diff --git a/ui/app/controllers/CControllerProblem.php b/ui/app/controllers/CControllerProblem.php index f1759806d2a..992ade5e41b 100644 --- a/ui/app/controllers/CControllerProblem.php +++ b/ui/app/controllers/CControllerProblem.php @@ -158,7 +158,7 @@ abstract class CControllerProblem extends CController { protected function cleanInput(array $input): array { if (array_key_exists('tags', $input) && $input['tags']) { $input['tags'] = array_filter($input['tags'], function($tag) { - return $tag['tag'] !== '' && $tag['value'] !== ''; + return !($tag['tag'] === '' && $tag['value'] === ''); }); } |