aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-03-04 10:06:30 +0100
committerGravatar GitHub <noreply@github.com> 2023-03-04 10:06:30 +0100
commit44f72889a589758da1b026a5288e23987a525095 (patch)
tree1ab1161e95c56a4f2700b6a05a2ab349653b6914
parent4f957dfc4c38c418e5b46a2dc8d34a9bdabb31db (diff)
Safer updateCachedValues (#5158)
#fix https://github.com/FreshRSS/FreshRSS/issues/5156
-rw-r--r--app/Models/FeedDAO.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php
index ef48789ff..1aae5fee5 100644
--- a/app/Models/FeedDAO.php
+++ b/app/Models/FeedDAO.php
@@ -434,7 +434,7 @@ SQL;
. '`cache_nbUnreads`=(SELECT COUNT(e2.id) FROM `_entry` e2 WHERE e2.id_feed=`_feed`.id AND e2.is_read=0)'
. ($id != 0 ? ' WHERE id=:id' : '');
$stm = $this->pdo->prepare($sql);
- if ($id != 0) {
+ if ($stm && $id != 0) {
$stm->bindParam(':id', $id, PDO::PARAM_INT);
}