diff options
-rw-r--r-- | ui/app/controllers/CControllerHost.php | 3 | ||||
-rw-r--r-- | ui/app/controllers/CControllerProblem.php | 2 |
2 files changed, 5 insertions, 0 deletions
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; } } diff --git a/ui/app/controllers/CControllerProblem.php b/ui/app/controllers/CControllerProblem.php index 8b2e0923034..b3f523c6f92 100644 --- a/ui/app/controllers/CControllerProblem.php +++ b/ui/app/controllers/CControllerProblem.php @@ -160,12 +160,14 @@ abstract class CControllerProblem extends CController { $input['tags'] = array_filter($input['tags'], function($tag) { return !($tag['tag'] === '' && $tag['value'] === ''); }); + $input['tags'] = array_values($input['tags']); } if (array_key_exists('inventory', $input) && $input['inventory']) { $input['inventory'] = array_filter($input['inventory'], function($inventory) { return $inventory['value'] !== ''; }); + $input['inventory'] = array_values($input['inventory']); } return $input; |