geocoder-php / Geocoder

The most featured Geocoder library written in PHP.
https://geocoder-php.org
MIT License
3.94k stars 517 forks source link

GeocodeQuery with zero as text fails #1124

Closed dmolineus closed 3 years ago

dmolineus commented 3 years ago

When creating a geocode query with '0' as text, the value is handled as invalid character. '0' though can be a valid query, e.g. when querying for postal codes. The issue here is the usage of empty().


$query = \Geocoder\Query\GeocodeQuery::create('0');
jbelien commented 3 years ago

Good point, thanks @dmolineus !

I'll create a PR to fix this later today.