Commit da7b5a0d authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-1201 Also check if arrays are equal.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 9e4f0a3e
...@@ -84,7 +84,10 @@ class StateObject implements Serializable { ...@@ -84,7 +84,10 @@ class StateObject implements Serializable {
*/ */
public function __set($name, $value) { public function __set($name, $value) {
$lname = strtolower($name); $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; return false;
$this->data[$lname] = $value; $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