From addb36247888265238498708b6ad0bf9c098cd46 Mon Sep 17 00:00:00 2001 From: nobohan Date: Wed, 3 Nov 2021 13:43:34 +0100 Subject: [PATCH] location: allow null value for location in Calendar --- src/Bundle/ChillCalendarBundle/Form/CalendarType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillCalendarBundle/Form/CalendarType.php b/src/Bundle/ChillCalendarBundle/Form/CalendarType.php index f6e4d2baa..753eb3728 100644 --- a/src/Bundle/ChillCalendarBundle/Form/CalendarType.php +++ b/src/Bundle/ChillCalendarBundle/Form/CalendarType.php @@ -188,7 +188,7 @@ class CalendarType extends AbstractType } return $location->getId(); }, - function (?string $id): Location { + function (?string $id): ?Location { return $this->om->getRepository(Location::class)->findOneBy(['id' => (int) $id]); } ))