Skip to content

Commit

Permalink
[BUGFIX] Cast lastMod property to int
Browse files Browse the repository at this point in the history
To prevent type mismatches when using pdo_mysql as the database driver,
the data for the lastMod field is cast to an integer.

Resolves: #87689
Releases: master, 9.5
Change-Id: I696f62a3b08d464708c9e1ab9edb4c733835f475
Reviewed-on: https://review.typo3.org/59687
Tested-by: TYPO3com <noreply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
  • Loading branch information
Richard Haeser authored and georgringer committed Feb 13, 2019
1 parent 798d265 commit 1ee70ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -104,7 +104,7 @@ public function getLastModified(): int
$lastMod = 0;
foreach ($this->items as $item) {
if ((int)$item['lastMod'] > $lastMod) {
$lastMod = $item['lastMod'];
$lastMod = (int)$item['lastMod'];
}
}

Expand Down
Expand Up @@ -99,7 +99,7 @@ public function generateItems(): void
foreach ($rows as $row) {
$this->items[] = [
'data' => $row,
'lastMod' => $row[$lastModifiedField]
'lastMod' => (int)$row[$lastModifiedField]
];
}
}
Expand Down

0 comments on commit 1ee70ea

Please sign in to comment.