From 92a150d64d9c028df7e5f3fe478b5a71c52c79aa Mon Sep 17 00:00:00 2001
From: Oliver Bartsch <bo@cedev.de>
Date: Thu, 25 Nov 2021 12:14:38 +0100
Subject: [PATCH] [BUGFIX] Prevent undefined array key in DataHandler

Resolves: #96069
Releases: master, 11.5
Change-Id: I2d883ebb7682ac7f402cdcb91b015ca74bdb72b4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72283
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Jochen <rothjochen@gmail.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Jochen <rothjochen@gmail.com>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
---
 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 d83d8e31d5fe..646628f07a09 100644
--- a/typo3/sysext/core/Classes/DataHandling/DataHandler.php
+++ b/typo3/sysext/core/Classes/DataHandling/DataHandler.php
@@ -1732,7 +1732,7 @@ class DataHandler implements LoggerAwareInterface
         // Skip range validation, if the default value equals 0 and the input value is 0, "0" or an empty string.
         // This is needed for timestamp date fields with ['range']['lower'] set.
         $skipRangeValidation =
-            isset($tcaFieldConf['default'])
+            isset($tcaFieldConf['default'], $res['value'])
             && (int)$tcaFieldConf['default'] === 0
             && ($res['value'] === '' || $res['value'] === '0' || $res['value'] === 0);
 
-- 
GitLab