From abeb264ff88ae761f94d7617b370a0b92c261acf 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/+/80850 Tested-by: core-ci <typo3@b13.com> Reviewed-by: Stefan Bürk <stefan@buerk.tech> Tested-by: Stefan Bürk <stefan@buerk.tech> --- 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 62f5640fa246..4008f4724545 100644 --- a/typo3/sysext/core/Classes/DataHandling/DataHandler.php +++ b/typo3/sysext/core/Classes/DataHandling/DataHandler.php @@ -5375,7 +5375,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