diff options
Diffstat (limited to 'app/Models/StatsDAOPGSQL.php')
| -rw-r--r-- | app/Models/StatsDAOPGSQL.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/Models/StatsDAOPGSQL.php b/app/Models/StatsDAOPGSQL.php index 9548027ce..52a99d2f4 100644 --- a/app/Models/StatsDAOPGSQL.php +++ b/app/Models/StatsDAOPGSQL.php @@ -5,7 +5,7 @@ class FreshRSS_StatsDAOPGSQL extends FreshRSS_StatsDAO { /** * Calculates the number of article per hour of the day per feed * - * @param integer $feed id + * @param int $feed id * @return array<int,int> */ public function calculateEntryRepartitionPerFeedPerHour(?int $feed = null): array { @@ -48,6 +48,9 @@ ORDER BY period ASC SQL; $stm = $this->pdo->query($sql); + if ($stm === false) { + return []; + } $res = $stm->fetchAll(PDO::FETCH_NAMED); switch ($period) { |
