From d407531ee31877228f663fb6c10fe5e3d3a1eea5 Mon Sep 17 00:00:00 2001 From: Yuriy Bakhtin Date: Fri, 17 Dec 2021 12:59:00 +0300 Subject: [PATCH] Fix test comments with same date (#5477) --- protected/humhub/modules/comment/models/Comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protected/humhub/modules/comment/models/Comment.php b/protected/humhub/modules/comment/models/Comment.php index 4eea52c757..91c7266522 100644 --- a/protected/humhub/modules/comment/models/Comment.php +++ b/protected/humhub/modules/comment/models/Comment.php @@ -249,7 +249,7 @@ class Comment extends ContentAddonActiveRecord implements ContentOwner $query->where($objectCondition); $query->limit($limit); } - $query->orderBy('created_at DESC'); + $query->orderBy('created_at DESC, id dESC'); $comments = array_reverse($query->all()); if ($useCaching) {