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

If no requests are passed to Requests_CommentModel::findByRequest(), return an empty result early.

parent c75cf004
No related branches found
No related tags found
No related merge requests found
......@@ -46,6 +46,12 @@ class Requests_CommentsModel extends Unl_Model
$db = Zend_Registry::get('db');
$requestId = $request->getId();
if (Unl_Util::isArray($requestId) && count($requestId) == 0) {
return new Unl_Model_Collection(__CLASS__);
} else if (!Unl_Util::isArray($requestId) && !$requestId) {
return null;
}
$select = new Zend_Db_Select($db);
$select->from(array('c' => 'creqRequestComments'), array('requestCommentId', 'request'));
if (Unl_Util::isArray($requestId)) {
......
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