Skip to content

Commit

Permalink
Cleaned up comma
Browse files Browse the repository at this point in the history
  • Loading branch information
rimi-itk committed Dec 16, 2024
1 parent 8af2144 commit 2a189c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Form/LocationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2a189c3

Please sign in to comment.