Skip to content

Commit

Permalink
Ensure property exist before assignation
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy379 committed Mar 27, 2024
1 parent 387c4ab commit 67c8307
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JsonMapperHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 67c8307

Please sign in to comment.