Skip to content

Commit fdb9c1a

Browse files
committed
7131: Nullify empty dates
1 parent a653969 commit fdb9c1a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Service/BaseImporter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ protected function convertLink(?object $obj): ?string
7474
/**
7575
* @throws \Exception
7676
*/
77-
protected function convertDate(string $date): \DateTime
77+
protected function convertDate(string $date): ?\DateTimeInterface
7878
{
79-
return new \DateTime($date);
79+
return empty($date) ? null : new \DateTimeImmutable($date);
8080
}
8181

8282
/**

0 commit comments

Comments
 (0)