Skip to content

Commit

Permalink
Set date field value to NULL from previous FALSE (ongr-io#898)
Browse files Browse the repository at this point in the history
* Set date field value to NULL from previous FALSE

* PHP 7.1 compatibility, again
  • Loading branch information
Christoph Singer authored and saimaz committed Dec 30, 2019
1 parent 5e440a9 commit e0b93a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Mapping/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected function denormalize(array $raw, string $namespace)
}
} else {
if ($fieldMeta['type'] == 'date') {
$value = \DateTime::createFromFormat(\DateTime::ISO8601, $value);
$value = \DateTime::createFromFormat(\DateTime::ISO8601, $value) ?: null;
}
if ($fieldMeta['public']) {
$object->{$fieldMeta['name']} = $value;
Expand Down

0 comments on commit e0b93a3

Please sign in to comment.