From 5b8922dc6cd1f0a42af02592b379ca11a57a5ef1 Mon Sep 17 00:00:00 2001 From: Claus Due <claus@namelesscoder.net> Date: Wed, 21 Dec 2016 16:44:14 +0100 Subject: [PATCH] [BUGFIX] Avoid remapping empty value in checkValueForInline This change prevents checkValueForInline from processing empty values. The existing check would process empty values since one of the true matches is when value cannot be interpreted as an integer. Change-Id: Iacd38363bcc23453da9fcc2eea359680c6b91175 Resolves: #79063 Releases: master, 7.6 Reviewed-on: https://review.typo3.org/51015 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Thomas Hohn <thomas@hohn.dk> Tested-by: Thomas Hohn <thomas@hohn.dk> Reviewed-by: Christer V <cvi@systime.dk> Reviewed-by: Kasper Ligaard <kasperligaard+typo3.org@gmail.com> Reviewed-by: Markus Sommer <markussom@posteo.de> Tested-by: Markus Sommer <markussom@posteo.de> Reviewed-by: Oliver Hader <oliver.hader@typo3.org> Tested-by: Oliver Hader <oliver.hader@typo3.org> --- 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 c02b9a2419fd..4790f0dff3aa 100644 --- a/typo3/sysext/core/Classes/DataHandling/DataHandler.php +++ b/typo3/sysext/core/Classes/DataHandling/DataHandler.php @@ -2504,7 +2504,7 @@ class DataHandler // Example for received data: // $value = 45,NEW4555fdf59d154,12,123 // We need to decide whether we use the stack or can save the relation directly. - if (strpos($value, 'NEW') !== false || !MathUtility::canBeInterpretedAsInteger($id)) { + if (!empty($value) && (strpos($value, 'NEW') !== false || !MathUtility::canBeInterpretedAsInteger($id))) { $this->remapStackRecords[$table][$id] = ['remapStackIndex' => count($this->remapStack)]; $this->addNewValuesToRemapStackChildIds($valueArray); $this->remapStack[] = [ -- GitLab