Bug #96069
closedTCA Input field validator
100%
Description
Hi, I'm running into this error:
(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Warning: Undefined array key "value" in /var/www/html/public/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 1737
TCA Setup
'email' => [
'exclude' => true,
'label' => 'Email',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'nospace,email,required',
'default' => '',
],
],
Saving the form with something other than an email.
This
// 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'])
&& (int)$tcaFieldConf['default'] === 0
&& ($res['value'] === '' || $res['value'] === '0' || $res['value'] === 0);
need to be that way
// 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($res['value'])
&& (int)$tcaFieldConf['default'] === 0
&& ($res['value'] === '' || $res['value'] === '0' || $res['value'] === 0);
Thanks
Updated by Gerrit Code Review almost 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72283
Updated by Gerrit Code Review almost 3 years ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72294
Updated by Oliver Bartsch almost 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 92a150d64d9c028df7e5f3fe478b5a71c52c79aa.