浏览代码

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

Lacey Sanderson 12 年之前
父节点
当前提交
03d94a16b1
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      tripal_views/views/handlers/chado_views_handler_filter_float.inc

+ 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();