Skip to content

Commit

Permalink
[BUGFIX] Avoid PHP8 warning for "Insert records" with hidden records
Browse files Browse the repository at this point in the history
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 <typo3@b13.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
brotkrueml authored and bmack committed Dec 21, 2021
1 parent ed0912e commit 308e07f
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -96,7 +96,10 @@ public function render($conf = [])
// @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
Expand Down

0 comments on commit 308e07f

Please sign in to comment.