forked from GNUsocial/gnu-social
[CORE][Entity] Compare with object properties when creating/updating, instead of class
This commit is contained in:
parent
aec8521e4b
commit
c0a404c640
|
@ -63,7 +63,7 @@ abstract class Entity implements \JsonSerializable
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($args as $prop => $val) {
|
foreach ($args as $prop => $val) {
|
||||||
if (property_exists($class, $prop)) {
|
if (property_exists($obj, $prop)) {
|
||||||
$set = 'set' . ucfirst(Formatting::snakeCaseToCamelCase($prop));
|
$set = 'set' . ucfirst(Formatting::snakeCaseToCamelCase($prop));
|
||||||
$obj->{$set}($val);
|
$obj->{$set}($val);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue