Skip to content
Snippets Groups Projects
Commit 5c45aef0 authored by Tim Steiner's avatar Tim Steiner
Browse files

Fix Requests_ApproverVoteModel::findUsersVotesForRequests() to not bomb out...

Fix Requests_ApproverVoteModel::findUsersVotesForRequests() to not bomb out when given an empty array.
parent b07af438
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,9 @@ class Requests_ApproverVoteModel extends Unl_Model
$select = new Zend_Db_Select($db);
$select->from(array('a' => 'creqApproverVotes'), array('approverVoteId', 'request'));
if (Unl_Util::isArray($requests)) {
if (count($requests) == 0) {
return new Unl_Model_Collection(__CLASS__);
}
$select->where('a.request IN(?)', $requests->getId());
} else {
$select->where('a.request = ?', $requests->getId());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment