diff --git a/module/bug/model.php b/module/bug/model.php index 072c55c513..48c55b3efb 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1570,7 +1570,7 @@ class bugModel extends model public function getUserBugPairs($account, $appendProduct = true, $limit = 0, $skipProductIDList = array(), $skipExecutionIDList = array(), $appendBugID = 0) { $deletedProjectIDList = $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq(1)->fetchPairs('id', 'id'); - + $bugs = array(); $stmt = $this->dao->select('t1.id, t1.title, t2.name as product') ->from(TABLE_BUG)->alias('t1') @@ -1894,6 +1894,7 @@ class bugModel extends model */ public function getStoryBugCounts($stories, $executionID = 0) { + if(empty($stories)) return array(); $bugCounts = $this->dao->select('story, COUNT(*) AS bugs') ->from(TABLE_BUG) ->where('story')->in($stories) diff --git a/module/task/model.php b/module/task/model.php index d9500761c1..9cc456b6f3 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -2481,6 +2481,7 @@ class taskModel extends model */ public function getStoryTaskCounts($stories, $executionID = 0) { + if(empty($stories)) return array(); $taskCounts = $this->dao->select('story, COUNT(*) AS tasks') ->from(TABLE_TASK) ->where('story')->in($stories) diff --git a/module/testcase/model.php b/module/testcase/model.php index acd61b1a33..4bd0abe109 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -683,6 +683,7 @@ class testcaseModel extends model */ public function getStoryCaseCounts($stories) { + if(empty($stories)) return array(); $caseCounts = $this->dao->select('story, COUNT(*) AS cases') ->from(TABLE_CASE) ->where('story')->in($stories)