mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-28 01:25:00 +00:00
add validation on calendar
This commit is contained in:
@@ -101,7 +101,7 @@ class CalendarType extends AbstractType
|
||||
return $res;
|
||||
},
|
||||
static function (?string $dateAsString): ?DateTimeImmutable {
|
||||
if ('' === $dateAsString) {
|
||||
if ('' === $dateAsString || null === $dateAsString) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ class CalendarType extends AbstractType
|
||||
return $res;
|
||||
},
|
||||
static function (?string $dateAsString): ?DateTimeImmutable {
|
||||
if ('' === $dateAsString) {
|
||||
if ('' === $dateAsString || null === $dateAsString) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user