diff options
| author | 2025-02-26 17:01:25 +0100 | |
|---|---|---|
| committer | 2025-02-26 17:01:25 +0100 | |
| commit | 5f6ef05ffc72fe5ce8e8fdd49aca30313e6f36d3 (patch) | |
| tree | 07cfccb5d7d1245694ec7bde23f0ab95cdf3e2c1 /app/Models/Category.php | |
| parent | 943049890a53212b635004189dba874b96637031 (diff) | |
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
Diffstat (limited to 'app/Models/Category.php')
| -rw-r--r-- | app/Models/Category.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/Models/Category.php b/app/Models/Category.php index da902d6bd..221e8644d 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -58,9 +58,15 @@ class FreshRSS_Category extends Minz_Model { public function lastUpdate(): int { return $this->lastUpdate; } - 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 inError(): bool { return $this->error; } |
