浏览代码

Fix for Views Query bug when no results returned.

Lacey Sanderson 7 年之前
父节点
当前提交
918098bf68
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tripal/tripal_views_query.inc

+ 1 - 1
tripal/tripal_views_query.inc

@@ -233,7 +233,7 @@ class tripal_views_query extends views_plugin_query {
 
         // Get the IDs
         $results = $query->execute();
-        $entity_ids = array_keys($results['TripalEntity']);
+        $entity_ids = (isset($results['TripalEntity']) AND is_array($results['TripalEntity'])) ? array_keys($results['TripalEntity']) : array();
 
         $this->pager->post_execute($view->result);
         if ($this->pager->use_count_query() || !empty($view->get_total_rows)) {