FIX: null date

This commit is contained in:
2023-12-22 14:14:02 -03:00
parent 20b2bdc6c6
commit 0829d338a9

View File

@ -9,7 +9,7 @@ class DateTime extends Mapper
public function __construct(string $column, ?string $property = null)
{
$this->setFunction(function($data) use ($column) {
return new DateTimeImmutable($data[$column]);
return new DateTimeImmutable($data[$column] ?? '');
});
if ($property !== null) {
$this->setProperty($property);