From bf720ff2770d869190abcf56d01bb841f4260749 Mon Sep 17 00:00:00 2001 From: Georg Ringer <georg.ringer@gmail.com> Date: Wed, 6 Sep 2023 09:46:03 +0200 Subject: [PATCH] [BUGFIX] Fix notice in DataHandler if deleting a record MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Check if a field exists before accessing it. Resolves: #101852 Releases: main, 12.4, 11.5 Change-Id: I95d227d920975b1e348c95a1069a9ddddcddc900 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80851 Tested-by: Stefan Bürk <stefan@buerk.tech> Reviewed-by: Stefan Bürk <stefan@buerk.tech> Tested-by: core-ci <typo3@b13.com> --- typo3/sysext/core/Classes/DataHandling/DataHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/core/Classes/DataHandling/DataHandler.php b/typo3/sysext/core/Classes/DataHandling/DataHandler.php index 95d4a72d51de..755c07c5c903 100644 --- a/typo3/sysext/core/Classes/DataHandling/DataHandler.php +++ b/typo3/sysext/core/Classes/DataHandling/DataHandler.php @@ -5024,7 +5024,7 @@ class DataHandler implements LoggerAwareInterface $updateFields = [ $deleteField => 1, ]; - if ($GLOBALS['TCA'][$table]['ctrl']['tstamp']) { + if ($GLOBALS['TCA'][$table]['ctrl']['tstamp'] ?? false) { $updateFields[$GLOBALS['TCA'][$table]['ctrl']['tstamp']] = $GLOBALS['EXEC_TIME']; } // before deleting this record, check for child records or references -- GitLab