瀏覽代碼

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

develop
Guillaume 2 年之前
父節點
當前提交
f9d9fa8f75
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. +5
    -1
      Component/CitiesComponent.php

+ 5
- 1
Component/CitiesComponent.php 查看文件

@@ -85,7 +85,11 @@ class CitiesComponent

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

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

Loading…
取消
儲存