Skip to content

Commit

Permalink
[BUGFIX] Prevent undefined array key "editlock" in DatabaseRecordList
Browse files Browse the repository at this point in the history
Resolves: #102063
Releases: main, 12.4, 11.5
Change-Id: I0ee1a4ec00ee972e9a2c8c3db442883125dacacd
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81284
Tested-by: core-ci <typo3@b13.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
  • Loading branch information
o-ba committed Oct 2, 2023
1 parent 963bf9c commit 272835c
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -2179,9 +2179,9 @@ protected function overlayEditLockPermissions($table, $row = [], $editPermission
if (empty($row)) {
return ($table === 'pages') || !$pageHasEditLock;
}
if (($table === 'pages' && $row['editlock']) || ($table !== 'pages' && $pageHasEditLock)) {
if (($table === 'pages' && ($row['editlock'] ?? false)) || ($table !== 'pages' && $pageHasEditLock)) {
$editPermission = false;
} elseif (isset($GLOBALS['TCA'][$table]['ctrl']['editlock']) && $row[$GLOBALS['TCA'][$table]['ctrl']['editlock']]) {
} elseif (isset($GLOBALS['TCA'][$table]['ctrl']['editlock']) && ($row[$GLOBALS['TCA'][$table]['ctrl']['editlock']] ?? false)) {
$editPermission = false;
}
}
Expand Down

0 comments on commit 272835c

Please sign in to comment.