mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 07:44:05 +02:00
DbObject: compare numbers as string
This commit is contained in:
parent
e040e84e5b
commit
c879cd1e5e
@ -305,7 +305,9 @@ abstract class DbObject
|
|||||||
throw new IE('Trying to set invalid key %s', $key);
|
throw new IE('Trying to set invalid key %s', $key);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($value === $this->get($key)) {
|
if ((is_numeric($value) || is_string($value))
|
||||||
|
&& (string) $value === (string) $this->get($key)
|
||||||
|
) {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,6 +323,7 @@ abstract class DbObject
|
|||||||
if ($value === $this->properties[$key]) {
|
if ($value === $this->properties[$key]) {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->hasBeenModified = true;
|
$this->hasBeenModified = true;
|
||||||
$this->modifiedProperties[$key] = true;
|
$this->modifiedProperties[$key] = true;
|
||||||
$this->properties[$key] = $value;
|
$this->properties[$key] = $value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user