From dcb6fa32a15bf4504414664b2a0983ab37cfd7f3 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 25 Jan 2024 13:20:50 +0000 Subject: [PATCH 1/2] 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']); } From e1381cfc5cf7f72743de80e30be66e3b28e4d035 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 25 Jan 2024 22:16:38 +0100 Subject: [PATCH 2/2] Update src/Model/Post/Counts.php Co-authored-by: Hypolite Petovan --- 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 8606a9b6cf..1b04636447 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` = ? AND NOT `vid` IS NULL 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 `vid` IS NOT 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']); }