A free, self-hostable news aggregator…
Ensure maximum date int (#3259)
Alexandre Alapetite08a5cf594623
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.phpindex a48cf7146..67ba84e75 100644--- a/app/Models/EntryDAO.php+++ b/app/Models/EntryDAO.php@@ -109,6 +109,7 @@ SQL;$valuesTmp['link'] = substr($valuesTmp['link'], 0, 1023);$valuesTmp['link'] = safe_ascii($valuesTmp['link']);$this->addEntryPrepared->bindParam(':link', $valuesTmp['link']);+ $valuesTmp['date'] = min($valuesTmp['date'], 2147483647);$this->addEntryPrepared->bindParam(':date', $valuesTmp['date'], PDO::PARAM_INT);if (empty($valuesTmp['lastSeen'])) {$valuesTmp['lastSeen'] = time();@@ -203,6 +204,7 @@ SQL;$valuesTmp['link'] = substr($valuesTmp['link'], 0, 1023);$valuesTmp['link'] = safe_ascii($valuesTmp['link']);$this->updateEntryPrepared->bindParam(':link', $valuesTmp['link']);+ $valuesTmp['date'] = min($valuesTmp['date'], 2147483647);$this->updateEntryPrepared->bindParam(':date', $valuesTmp['date'], PDO::PARAM_INT);$valuesTmp['lastSeen'] = time();$this->updateEntryPrepared->bindParam(':last_seen', $valuesTmp['lastSeen'], PDO::PARAM_INT);