Просмотр исходного кода

Ticket #4558 - Build-in API support: Extended search by Location.

AntonLV 1 год назад
Родитель
Сommit
05f1f749c3
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      template/scripts/BxBaseSearchExtendedForm.php

+ 2 - 2
template/scripts/BxBaseSearchExtendedForm.php

@@ -32,7 +32,7 @@ class BxBaseSearchExtendedForm extends BxTemplFormView
         //--- Process field with 'Location' type. 
         if($bType && $this->aInputs[$sName]['type'] == 'location') {
             $aLocation = BxDolMetatags::locationsRetrieveFromForm($sName, $this);
-            if ($aLocation) {
+            if ($aLocation && !bx_is_empty_array($aLocation)) {
                 return [
                     'string' => parent::getCleanValue($sName),
                     'array' => $aLocation,
@@ -43,7 +43,7 @@ class BxBaseSearchExtendedForm extends BxTemplFormView
         //--- Process field with 'Location Radius' type. 
         if($bType && $this->aInputs[$sName]['type'] == 'location_radius') {
             $aLocation = BxDolMetatags::locationsRetrieveFromForm($sName, $this);
-            if ($aLocation) {
+            if ($aLocation && !bx_is_empty_array($aLocation)) {
                 $aLocation[] = (int)$this->getLocationVal($this->aInputs[$sName], 'rad');
                 return [
                     'string' => parent::getCleanValue($sName),