Check for empty `$addressPart` can fail
Closed this issue · 1 comments
rintisch commented
Is neither city nor zip is entered the check if (empty($addressPart))
fails because a white space makes $addressPart
being not empty.
geocoding/Classes/Service/GeoService.php
Lines 81 to 88 in f8cfd7f
Would be a solution to check with strlen(trim($addressPart)) <= 0
instead.
Background:
Otherwise this can lead to two consecutive commas. As a result the request leads sometimes to ZERO_RESULTS
.
Is the solution okay? Shall I make a PR?
bmack commented
Yes. Please go ahead.