From 32b8f4ae4243bc915fe38e28dd991a28c09b4331 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Sun, 8 Nov 2020 17:43:21 +0100 Subject: Remove intcmp() --- ratatoeskr/frontend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ratatoeskr/frontend.php') diff --git a/ratatoeskr/frontend.php b/ratatoeskr/frontend.php index 56bb231..8fab0a1 100644 --- a/ratatoeskr/frontend.php +++ b/ratatoeskr/frontend.php @@ -381,7 +381,7 @@ $ste->register_tag("article_comments", function ($ste, $params, $sub) { $sortdir = (@$params["sort"] == "desc") ? -1 : 1; usort($comments, function ($a, $b) use ($sortdir) { - return intcmp($a->get_timestamp(), $b->get_timestamp()) * $sortdir; + return ($a->get_timestamp() <=> $b->get_timestamp()) * $sortdir; }); $comments = array_map("comment_transform_ste", $comments); -- cgit v1.2.3-70-g09d2