Skip to content

Commit

Permalink
[BUGFIX] Fix type error in TCA table wizard for null values
Browse files Browse the repository at this point in the history
When using renderType textTable for text fields in TCA, the controller
will pass the currently stored value to underlying API. This API always
expects a string. Most of the time those fields might have null as
default in persistence leading to a PHP TypeError.

Therefore a check is added which will fall back to empty string as
proper default for internal API.

Resolves: #92761
Releases: master, 10.4, 9.5
Change-Id: I29ef4076e21a1f93f9b6834afcc163c4041a0909
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66574
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
  • Loading branch information
DanielSiepmann authored and bmack committed Nov 7, 2020
1 parent 9d124ea commit 63ed9f2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ protected function getConfiguration(array $row, ServerRequestInterface $request)
} else {
// Regular line based table configuration:
$columns = $row[$this->colsFieldName] ?? 0;
$configuration = $this->configurationStringToArray($row[$this->P['field']], (int)$columns);
$configuration = $this->configurationStringToArray($row[$this->P['field']] ?? '', (int)$columns);
}
}
$configuration = is_array($configuration) ? $configuration : [];
Expand Down

0 comments on commit 63ed9f2

Please sign in to comment.