Commit 48975aef authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Prevent undefined array key warnings in RecordHistory

Occurred on accessing the record history
for records on pid=0.

Resolves: #97682
Releases: main, 11.5
Change-Id: I041fd9c2dfa8f8cfda4f89c47d320e5bfa6e7f3a

Tested-by: core-ci's avatarcore-ci <>
Tested-by: Christian Kuhn's avatarChristian Kuhn <>
Tested-by: Stefan Bürk's avatarStefan Bürk <>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <>
Reviewed-by: Oliver Klee's avatarOliver Klee <>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <>
parent 1c0cf77e
......@@ -434,7 +434,7 @@ class RecordHistory
$deletedField = $GLOBALS['TCA']['pages']['ctrl']['delete'];
$fields = 'pid,' . $deletedField;
$pageRecord = BackendUtility::getRecord('pages', $pageId, $fields, '', false);
$isDeletedPage = (bool)$pageRecord[$deletedField];
$isDeletedPage = (bool)($pageRecord[$deletedField] ?? false);
if ($isDeletedPage) {
// The page is deleted, so we fake its uid to be the one of the parent page.
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