Commit 88675a02 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #524 in ZP/z-push from...

Merge pull request #524 in ZP/z-push from bugfix/ZP-1201-settings-command-triggered-by-koe to develop

* commit 'acbcafc5':
  ZP-1201 REVERT: Overwrite KOE capabilities only if they are different from the already saved value.
  ZP-1201 Overwrite KOE capabilities only if they are different from the already saved value.
  ZP-1201 Also check if arrays are equal.
parents ea50caa5 acbcafc5
......@@ -84,7 +84,10 @@ class StateObject implements Serializable {
*/
public function __set($name, $value) {
$lname = strtolower($name);
if (isset($this->data[$lname]) && is_scalar($value) && !is_array($value) && $this->data[$lname] === $value)
if (isset($this->data[$lname]) &&
( (is_scalar($value) && !is_array($value) && $this->data[$lname] === $value) ||
(is_array($value) && is_array($this->data[$lname]) && $this->data[$lname] === $value)
))
return false;
$this->data[$lname] = $value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment