From c0a404c640620b95dbf1a2fd40774a21e15ff6e3 Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Wed, 11 Aug 2021 23:46:02 +0100 Subject: [PATCH] [CORE][Entity] Compare with object properties when creating/updating, instead of class --- src/Core/Entity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Entity.php b/src/Core/Entity.php index 81c0deef9f..899310faad 100644 --- a/src/Core/Entity.php +++ b/src/Core/Entity.php @@ -63,7 +63,7 @@ abstract class Entity implements \JsonSerializable } foreach ($args as $prop => $val) { - if (property_exists($class, $prop)) { + if (property_exists($obj, $prop)) { $set = 'set' . ucfirst(Formatting::snakeCaseToCamelCase($prop)); $obj->{$set}($val); } else {