diff --git a/src/Api/Actions/Posts/IndexAction.php b/src/Api/Actions/Posts/IndexAction.php index c5dcbb27f..7bea440e9 100644 --- a/src/Api/Actions/Posts/IndexAction.php +++ b/src/Api/Actions/Posts/IndexAction.php @@ -61,6 +61,7 @@ class IndexAction extends SerializeCollectionAction if (count($postIds)) { $posts = $this->posts->findByIds($postIds, $user); } else { + $where = []; if ($discussionId = $request->get('discussions')) { $where['discussion_id'] = $discussionId; }