From f854477b35066e37d59b5557fb9a4e107ca129f6 Mon Sep 17 00:00:00 2001 From: Oliver Bartsch Date: Thu, 3 Aug 2023 21:00:32 +0200 Subject: [PATCH] [BUGFIX] Prevent TypeError in DatabaseIntegrityController Apply type cast to the input value to prevent a TypeError. Resolves: #101555 Releases: main, 12.4 Change-Id: If2db6d0cc793999f2ce93d16cfedadb12325c316 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80231 Tested-by: Oliver Bartsch Reviewed-by: Oliver Bartsch Tested-by: core-ci --- .../Controller/DatabaseIntegrityController.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/typo3/sysext/lowlevel/Classes/Controller/DatabaseIntegrityController.php b/typo3/sysext/lowlevel/Classes/Controller/DatabaseIntegrityController.php index 87a38d2714c7..b49f571f9ab6 100644 --- a/typo3/sysext/lowlevel/Classes/Controller/DatabaseIntegrityController.php +++ b/typo3/sysext/lowlevel/Classes/Controller/DatabaseIntegrityController.php @@ -1613,10 +1613,10 @@ protected function getFormElements(int $subLevel = 0, $queryConfig = '', string $lineHTML[] = $this->makeComparisonSelector($subscript, $fieldName, $conf); if ($conf['comparison'] === 100 || $conf['comparison'] === 101) { // between - $lineHTML[] = $this->getDateTimePickerField($fieldPrefix . '[inputValue]', $conf['inputValue'], 'date'); - $lineHTML[] = $this->getDateTimePickerField($fieldPrefix . '[inputValue1]', $conf['inputValue1'], 'date'); + $lineHTML[] = $this->getDateTimePickerField($fieldPrefix . '[inputValue]', (string)$conf['inputValue'], 'date'); + $lineHTML[] = $this->getDateTimePickerField($fieldPrefix . '[inputValue1]', (string)$conf['inputValue1'], 'date'); } else { - $lineHTML[] = $this->getDateTimePickerField($fieldPrefix . '[inputValue]', $conf['inputValue'], 'date'); + $lineHTML[] = $this->getDateTimePickerField($fieldPrefix . '[inputValue]', (string)$conf['inputValue'], 'date'); } $lineHTML[] = ''; break; @@ -1625,10 +1625,10 @@ protected function getFormElements(int $subLevel = 0, $queryConfig = '', string $lineHTML[] = $this->makeComparisonSelector($subscript, $fieldName, $conf); if ($conf['comparison'] === 100 || $conf['comparison'] === 101) { // between: - $lineHTML[] = $this->getDateTimePickerField($fieldPrefix . '[inputValue]', $conf['inputValue'], 'datetime'); - $lineHTML[] = $this->getDateTimePickerField($fieldPrefix . '[inputValue1]', $conf['inputValue1'], 'datetime'); + $lineHTML[] = $this->getDateTimePickerField($fieldPrefix . '[inputValue]', (string)$conf['inputValue'], 'datetime'); + $lineHTML[] = $this->getDateTimePickerField($fieldPrefix . '[inputValue1]', (string)$conf['inputValue1'], 'datetime'); } else { - $lineHTML[] = $this->getDateTimePickerField($fieldPrefix . '[inputValue]', $conf['inputValue'], 'datetime'); + $lineHTML[] = $this->getDateTimePickerField($fieldPrefix . '[inputValue]', (string)$conf['inputValue'], 'datetime'); } $lineHTML[] = ''; break;