From 9f26d5833d602335f6c60202c85ee6b33a7cdfa1 Mon Sep 17 00:00:00 2001 From: Oliver Bartsch <bo@cedev.de> Date: Fri, 29 Sep 2023 15:53:09 +0200 Subject: [PATCH] [BUGFIX] Prevent undefined array key "editlock" in DatabaseRecordList Resolves: #102063 Releases: main, 12.4, 11.5 Change-Id: I0ee1a4ec00ee972e9a2c8c3db442883125dacacd Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81306 Tested-by: Oliver Bartsch <bo@cedev.de> Tested-by: core-ci <typo3@b13.com> Reviewed-by: Oliver Bartsch <bo@cedev.de> --- .../recordlist/Classes/RecordList/DatabaseRecordList.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php b/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php index 8d0b4c15af36..07706e8bb9c3 100644 --- a/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php +++ b/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php @@ -2299,9 +2299,9 @@ class DatabaseRecordList 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; } } -- GitLab