Procházet zdrojové kódy

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

AntonLV před 1 rokem
rodič
revize
05f1f749c3
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  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),