Commit 308e07f1 authored by Chris Müller's avatar Chris Müller Committed by Benni Mack
Browse files

[BUGFIX] Avoid PHP8 warning for "Insert records" with hidden records

When one or more hidden records are referenced in an "Insert records"
content element, an "undefined array key" warning was thrown.

Resolves: #96419
Releases: main, 11.5
Change-Id: I4f90dc78540bf8c56163cfb8247a13c86869fbe1
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72777


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent ed0912e0
......@@ -96,7 +96,10 @@ class RecordsContentObject extends AbstractContentObject
// @deprecated since v11, will be removed in v12. Drop together with ContentObjectRenderer->currentRecordTotal
$this->cObj->currentRecordTotal = $itemArrayCount;
foreach ($this->itemArray as $val) {
$row = $this->data[$val['table']][$val['id']];
$row = $this->data[$val['table']][$val['id']] ?? null;
if ($row === null) {
continue;
}
// Perform overlays if necessary (records coming from category collections are already overlaid)
if ($source) {
// Versioning preview
......
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