From 5f6ef05ffc72fe5ce8e8fdd49aca30313e6f36d3 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 26 Feb 2025 17:01:25 +0100 Subject: Fix bigint timestamps on 32-bit (#7375) * Fix bigint timestamps on 32-bit fix https://github.com/FreshRSS/FreshRSS/issues/7374 SQL requests for BIGINT fields may return a string on 32-bit systems instead of an integer * Calculations may also be string --- app/Models/Feed.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'app/Models/Feed.php') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 143da0139..57bf9d7a4 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -308,9 +308,15 @@ class FreshRSS_Feed extends Minz_Model { public function _description(string $value): void { $this->description = $value == '' ? '' : $value; } - public function _lastUpdate(int $value): void { - $this->lastUpdate = $value; + + /** + * @param int|numeric-string $value + * 32-bit systems provide a string and will fail in year 2038 + */ + public function _lastUpdate(int|string $value): void { + $this->lastUpdate = (int)$value; } + public function _priority(int $value): void { $this->priority = $value; } -- cgit v1.2.3