Skip to content

Commit

Permalink
Allows dates past 2038
Browse files Browse the repository at this point in the history
  • Loading branch information
Alkarex committed Aug 7, 2023
1 parent 2d73696 commit e2713d3
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions app/Models/EntryDAO.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ public function addEntry(array $valuesTmp, bool $useTmpTable = true): bool {
$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();
Expand Down Expand Up @@ -258,7 +257,6 @@ public function updateEntry(array $valuesTmp): bool {
$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);
$this->updateEntryPrepared->bindParam(':last_seen', $valuesTmp['lastSeen'], PDO::PARAM_INT);
if ($valuesTmp['is_read'] === null) {
Expand Down

0 comments on commit e2713d3

Please sign in to comment.