From 2a189c368da41bf3845d796c3e6f820eab601734 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Mon, 16 Dec 2024 09:58:37 +0100 Subject: [PATCH] Cleaned up comma --- src/Form/LocationType.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Form/LocationType.php b/src/Form/LocationType.php index 0386838..173d655 100644 --- a/src/Form/LocationType.php +++ b/src/Form/LocationType.php @@ -27,7 +27,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void public function implodeCoordinates(?array $coordinates): string { - return implode(', ', $coordinates ?? []); + // Separate non-empty values with comma. + return implode(', ', array_filter($coordinates ?? [])); } public function explodeCoordinates(string $coordinates): array