From b65ea979010eb488cc9c1fb1d0f082e868c191d5 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 18 Nov 2023 23:21:20 +0100 Subject: Fix PHP 7 compatibility strict_types (#5893) * Fix PHP 7 compatibility https://github.com/FreshRSS/FreshRSS/discussions/5892 * Multiple PHP 7 fixes * PHPStan --- app/Models/FeedDAO.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/Models/FeedDAO.php') diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index 42a4e77f1..82e33dd84 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -584,6 +584,7 @@ SQL; $list = []; foreach ($listDAO as $key => $dao) { + FreshRSS_DatabaseDAO::pdoInt($dao, ['id', 'kind', 'category', 'lastUpdate', 'priority', 'error', 'ttl', 'cache_nbUnreads', 'cache_nbEntries']); if (!isset($dao['name'])) { continue; } @@ -627,6 +628,6 @@ SQL; return -1; } $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0); - return $res[0] ?? 0; + return (int)($res[0] ?? 0); } } -- cgit v1.2.3