Browse Source

Erreur 500 : Argument 1 passed to Geocoder\Query\GeocodeQuery::create() must be of the type string, null given

develop
Guillaume 2 years ago
parent
commit
f9d9fa8f75
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      Component/CitiesComponent.php

+ 5
- 1
Component/CitiesComponent.php View File



public function callAddressApi($query) public function callAddressApi($query)
{ {
$provider = $this->getGeocoderProvider() ;;
if(is_null($query)) {
$query = '';
}

$provider = $this->getGeocoderProvider() ;
$query = GeocodeQuery::create($query)->withData('type', 'housenumber'); $query = GeocodeQuery::create($query)->withData('type', 'housenumber');
$results = $provider->geocodeQuery($query); $results = $provider->geocodeQuery($query);
$resultsToReturn = array(); $resultsToReturn = array();

Loading…
Cancel
Save