IcingaArguments: Mark arguments for removal when setting empty

Without the fix arguments will remain untouched in DB, but appear to be removed in activity log.

fixes #1829
This commit is contained in:
Markus Frosch 2019-04-15 16:35:40 +02:00
parent fd27d25df3
commit ef41022a73

View File

@ -190,18 +190,8 @@ class IcingaArguments implements Iterator, Countable, IcingaConfigRenderer
return $attrs;
}
// TODO -> UNFINISHED!!!
public function setArguments($arguments)
{
if (empty($arguments)) {
if (count($this->arguments)) {
$this->arguments = [];
$this->modified = true;
}
return $this;
}
$arguments = (array) $arguments;
foreach ($arguments as $arg => $val) {