summaryrefslogtreecommitdiff
path: root/classes/feeds.php
diff options
context:
space:
mode:
authorwn_ <[email protected]>2021-12-14 12:50:53 +0000
committerwn_ <[email protected]>2021-12-14 12:50:53 +0000
commit0726a9d820855f96dccf873e6279f74479800efb (patch)
tree19a9116fe6f9742a23253ac06369cf9cc1fc1e49 /classes/feeds.php
parentddc81b2c8979904bd042efd0412d93fb7c821903 (diff)
Handle another potential 'SUM()' null situation in Feeds.
Diffstat (limited to 'classes/feeds.php')
-rwxr-xr-xclasses/feeds.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/classes/feeds.php b/classes/feeds.php
index 2a4fe4993..62fd6a5b3 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -955,7 +955,8 @@ class Feeds extends Handler_Protected {
$sth->execute([$owner_uid, $feed]);
$row = $sth->fetch();
- return $row["count"];
+ // Handle 'SUM()' returning null if there are no results
+ return $row["count"] ?? 0;
} else if ($n_feed == -1) {
$match_part = "marked = true";