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 c9f3792
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/JsonMapperHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public static function setUndefinedProperty($object, $propName, $jsonValue)
$object->{$propName} = $jsonValue;
$object->customFields[$propName] = $jsonValue;
}
} else {
$object->{$propName} = $jsonValue;
}
} elseif(isset($object->{$propName})) {
$object->{$propName} = $jsonValue;
}
}
}

0 comments on commit c9f3792

Please sign in to comment.