Commit 2618039a authored by Daniel Siepmann's avatar Daniel Siepmann Committed by Georg Ringer
Browse files

[BUGFIX] Cast to prevent PHP TypeError when using sqlite

sqlite3 doesn't return casted values right now, everything is a string.
Some methods require integers, e.g. uid of a record. In order to prevent
TypeError due to mismatch, values are casted to integer.

Resolves: #90515
Releases: master
Change-Id: Ibb1654a412f94b5bd511dac5bed75a1af0683fe9
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63399


Reviewed-by: Björn Jacob's avatarBjörn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Reviewed-by: default avatarChristian Eßl <indy.essl@gmail.com>
Reviewed-by: Claus Due's avatarClaus Due <claus@phpmind.net>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarChristian Eßl <indy.essl@gmail.com>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Claus Due's avatarClaus Due <claus@phpmind.net>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
parent a848ba4f
......@@ -111,7 +111,7 @@ class ContentFetcher
$rememberer = $this->backendLayout->getRecordRememberer();
foreach ($this->fetchedContentRecords[$this->backendLayout->getDrawingConfiguration()->getLanguageColumnsPointer()] ?? [] as $contentRecordsInColumn) {
foreach ($contentRecordsInColumn as $contentRecord) {
if (!$rememberer->isRemembered($contentRecord['uid']) && !in_array($contentRecord['colPos'], $knownColumnPositionNumbers)) {
if (!$rememberer->isRemembered((int)$contentRecord['uid']) && !in_array($contentRecord['colPos'], $knownColumnPositionNumbers)) {
$unrendered[] = $contentRecord;
}
}
......
......@@ -49,8 +49,8 @@ class GridColumnItem extends AbstractGridObject
parent::__construct($backendLayout);
$this->column = $column;
$this->record = $record;
$backendLayout->getRecordRememberer()->rememberRecordUid($record['uid']);
$backendLayout->getRecordRememberer()->rememberRecordUid($record['l18n_parent']);
$backendLayout->getRecordRememberer()->rememberRecordUid((int)$record['uid']);
$backendLayout->getRecordRememberer()->rememberRecordUid((int)$record['l18n_parent']);
}
public function isVersioned(): bool
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment