From 6893e2c3f7f80e13b7f7126dc6e65d073b4652bb Mon Sep 17 00:00:00 2001 From: Philipp Date: Wed, 15 Sep 2021 08:48:41 +0200 Subject: [PATCH] Add feedback / revert fix for $item['post-type'] --- src/Database/Database.php | 3 +-- src/Model/Item.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Database/Database.php b/src/Database/Database.php index e4a4a0f571..a93d4e610b 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -1465,8 +1465,7 @@ class Database $this->logger->notice('Invalid count.', ['table' => $table, 'expression' => $expression, 'condition' => $condition_string, 'callstack' => System::callstack()]); return 0; } else { - // Ensure to always return either a "null" or a numeric value - return is_numeric($row['count']) ? (int)$row['count'] : $row['count']; + return (int)$row['count']; } } diff --git a/src/Model/Item.php b/src/Model/Item.php index 83cbcbb01a..8327252abc 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2259,7 +2259,7 @@ class Item $condition[0] .= " AND `received` < UTC_TIMESTAMP() - INTERVAL ? DAY"; $condition[] = $days; - $items = Post::select(['resource-id', 'starred', 'id', 'post-type', 'uid', 'uri-id', 'post-type'], $condition); + $items = Post::select(['resource-id', 'starred', 'id', 'post-type', 'uid', 'uri-id'], $condition); if (!DBA::isResult($items)) { return;