Commit 147b9272 authored by Robert Kärner's avatar Robert Kärner Committed by Christian Kuhn
Browse files

[BUGFIX] Fix IRRE related undefined key warnings

Two occurrences in the DataHandler and another in
InlineRecordContainer needed fallbacks for array access.

Resolves: #95838
Releases: master
Change-Id: I4b63f6431cd92bdb451359a29d974bbacacfc3a8
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72017

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Spoo <mail@christian-spoo.info>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarChristian Spoo <mail@christian-spoo.info>
Reviewed-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Rudy Gnodde's avatarRudy Gnodde <rudy@famouswolf.com>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 695c6ad1
......@@ -598,7 +598,7 @@ class InlineRecordContainer extends AbstractContainer
if (($enabledControls['hide'] ?? false)
&& $permsEdit
&& $hiddenField
&& $tcaTableCols[$hiddenField]
&& ($tcaTableCols[$hiddenField] ?? false)
&& (!($tcaTableCols[$hiddenField]['exclude'] ?? false) || $backendUser->check('non_exclude_fields', $foreignTable . ':' . $hiddenField))
) {
if ($rec[$hiddenField]) {
......
......@@ -6271,7 +6271,7 @@ class DataHandler implements LoggerAwareInterface
// The record is new and has one or more new ids (in case of versioning/workspaces):
if (str_contains($id, 'NEW')) {
// Replace NEW...-ID with real uid:
$id = $this->substNEWwithIDs[$id];
$id = $this->substNEWwithIDs[$id] ?? '';
// If the new parent record is on a non-live workspace or versionized, it has another new id:
if (isset($this->autoVersionIdMap[$table][$id])) {
$id = $this->autoVersionIdMap[$table][$id];
......@@ -6291,7 +6291,7 @@ class DataHandler implements LoggerAwareInterface
$affectedTable = implode('_', $parts);
$prependTable = true;
}
$value = $this->substNEWwithIDs[$value];
$value = $this->substNEWwithIDs[$value] ?? '';
// The record is new, but was also auto-versionized and has another new id:
if (isset($this->autoVersionIdMap[$affectedTable][$value])) {
$value = $this->autoVersionIdMap[$affectedTable][$value];
......
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