Skip to content

Commit f435e92

Browse files
committed
7131: Nullified empty dates
1 parent aa43847 commit f435e92

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Service/BaseImporter.php

Lines changed: 3 additions & 3 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
/**
@@ -87,7 +87,7 @@ protected function convertDate(string $date): \DateTime
8787
protected function convertSystemOwner(array $systemOwner): string
8888
{
8989
if (empty($systemOwner)) {
90-
return '';
90+
return '';
9191
}
9292

9393
return $systemOwner[0]->LookupValue ?? '';

0 commit comments

Comments
 (0)