From c1f4e7729367b4e2aaffcf574041bac2503ee22d Mon Sep 17 00:00:00 2001 From: nobohan Date: Wed, 3 Nov 2021 13:42:35 +0100 Subject: [PATCH] location: allow null value for location in Activity --- src/Bundle/ChillActivityBundle/Form/ActivityType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityType.php b/src/Bundle/ChillActivityBundle/Form/ActivityType.php index 19d53c262..5ef08832d 100644 --- a/src/Bundle/ChillActivityBundle/Form/ActivityType.php +++ b/src/Bundle/ChillActivityBundle/Form/ActivityType.php @@ -313,7 +313,7 @@ class ActivityType extends AbstractType } return $location->getId(); }, - function (?string $id): Location { + function (?string $id): ?Location { return $this->om->getRepository(Location::class)->findOneBy(['id' => (int) $id]); } ))