FIX: null date
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user