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