Skip to content

Commit

Permalink
Fixing bug when custom field equal to 0 (#445)
Browse files Browse the repository at this point in the history
Fixing bug with deleting custom field if it is equal to 0
  • Loading branch information
AAlekseevich authored Jun 17, 2022
1 parent 11bde13 commit 309cd73
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 @@ -17,7 +17,7 @@ public static function setUndefinedProperty($object, $propName, $jsonValue)
{
// If the property is a custom field type, assign a value to the custom Fields array.
if (substr($propName, 0, 12) == 'customfield_') {
if (!empty($jsonValue)) {
if (!is_null($jsonValue)) {
$object->{$propName} = $jsonValue;
$object->customFields[$propName] = $jsonValue;
}
Expand Down

0 comments on commit 309cd73

Please sign in to comment.