aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2020-06-13 21:19:19 +0200
committerGravatar GitHub <noreply@github.com> 2020-06-13 21:19:19 +0200
commit6edbeaaf6add5e6f60d949301a05ef42fbdc6afd (patch)
tree20baf127d045bdbabd2becd3516f1a0ccb05ed7b
parent15505a03779326f9497644e9827477cdcc26c2d2 (diff)
Add error log (#3055)
For https://github.com/FreshRSS/FreshRSS/issues/3054
-rw-r--r--app/Models/EntryDAO.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index db936479d..a48cf7146 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -1083,6 +1083,10 @@ SELECT c FROM (
ORDER BY o
SQL;
$stm = $this->pdo->prepare($sql);
+ if (!$stm) {
+ Minz_Log::error('SQL error in ' . __method__ . ' ' . json_encode($this->pdo->errorInfo()));
+ return false;
+ }
//Binding a value more than once is not standard and does not work with native prepared statements (e.g. MySQL) https://bugs.php.net/bug.php?id=40417
$stm->bindValue(':priority_normal1', FreshRSS_Feed::PRIORITY_NORMAL, PDO::PARAM_INT);
$stm->bindValue(':priority_normal2', FreshRSS_Feed::PRIORITY_NORMAL, PDO::PARAM_INT);