From dcb6fa32a15bf4504414664b2a0983ab37cfd7f3 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 25 Jan 2024 13:20:50 +0000 Subject: [PATCH] Fixes "Counts::update(): Argument #3 ($vid) must be of type int, null given" --- src/Model/Post/Counts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Post/Counts.php b/src/Model/Post/Counts.php index 4a14f25eb7..8606a9b6cf 100644 --- a/src/Model/Post/Counts.php +++ b/src/Model/Post/Counts.php @@ -78,7 +78,7 @@ class Counts { self::update($uri_id, $parent_uri_id, Verb::getID(Activity::POST), Activity::POST); - $activities = DBA::p("SELECT `parent-uri-id`, `vid`, `verb`, `body` FROM `post-view` WHERE `thr-parent-id` = ? AND `gravity` = ? GROUP BY `parent-uri-id`, `vid`, `verb`, `body`", $uri_id, Item::GRAVITY_ACTIVITY); + $activities = DBA::p("SELECT `parent-uri-id`, `vid`, `verb`, `body` FROM `post-view` WHERE `thr-parent-id` = ? AND `gravity` = ? AND NOT `vid` IS NULL GROUP BY `parent-uri-id`, `vid`, `verb`, `body`", $uri_id, Item::GRAVITY_ACTIVITY); while ($activity = DBA::fetch($activities)) { self::update($uri_id, $activity['parent-uri-id'], $activity['vid'], $activity['verb'], $activity['body']); }