Kaynağa Gözat

Fixed bug in float filter handler to allow it to be excluded if empty

Lacey Sanderson 12 yıl önce
ebeveyn
işleme
03d94a16b1

+ 7 - 1
tripal_views/views/handlers/chado_views_handler_filter_float.inc

@@ -50,9 +50,15 @@ class chado_views_handler_filter_float extends views_handler_filter_float {
 
     // make optional
     // if it is not set or empty then don't restrict the query
-    if (!$this->value) {
+    if (!$this->value AND !is_array($this->value)) {
       return;
     }
+    elseif (is_array($this->value)) {
+      $tmp = array_filter($this->value);
+      if (!$tmp) {
+        return;
+      }
+    }
 
     $this->ensure_my_table();