IcingaObject, ..WithSettings: fix Basket-related..
...problems
This commit is contained in:
parent
7926d558ba
commit
b644a7c6a7
|
@ -44,7 +44,12 @@ abstract class DbObjectWithSettings extends DbObject
|
|||
|
||||
public function setSettings($settings)
|
||||
{
|
||||
$this->settings = (array) $settings;
|
||||
$settings = (array) $settings;
|
||||
ksort($settings);
|
||||
if ($settings !== $this->settings) {
|
||||
$this->settings = $settings;
|
||||
$this->hasBeenModified = true;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
|
@ -1086,16 +1086,17 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
|
||||
public function getVars()
|
||||
{
|
||||
$vars = (object) array();
|
||||
$vars = [];
|
||||
foreach ($this->vars() as $key => $var) {
|
||||
if ($var->hasBeenDeleted()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$vars->$key = $var->getValue();
|
||||
$vars[$key] = $var->getValue();
|
||||
}
|
||||
ksort($vars);
|
||||
|
||||
return $vars;
|
||||
return (object) $vars;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue