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

Tested-by: core-ci's avatarcore-ci <>
Tested-by: Benni Mack's avatarBenni Mack <>
Reviewed-by: Benni Mack's avatarBenni Mack <>
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) {
// 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