Skip to content
Snippets Groups Projects
Commit 8c393e64 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/+/72762


Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent d2935594
No related merge requests found
......@@ -94,7 +94,10 @@ class RecordsContentObject extends AbstractContentObject
$cObj->setParent($this->cObj->data, $this->cObj->currentRecord);
$this->cObj->currentRecordNumber = 0;
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
......
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