diff --git a/src/JsonMapperHelper.php b/src/JsonMapperHelper.php index 355867f..4f736bd 100644 --- a/src/JsonMapperHelper.php +++ b/src/JsonMapperHelper.php @@ -21,7 +21,7 @@ public static function setUndefinedProperty($object, $propName, $jsonValue) $object->{$propName} = $jsonValue; $object->customFields[$propName] = $jsonValue; } - } else { + } elseif (isset($object->{$propName})) { $object->{$propName} = $jsonValue; } }