Bug #6195
Empty form fields converted to empty string instead of type declared for property
Status: | Resolved | Start date: | ||
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Robert Lemke | % Done: | 100% |
|
Category: | Property | |||
Target version: | TYPO3 Flow Base Distribution - 1.0 alpha 11 | |||
PHP Version: | Complexity: | |||
Has patch: | Affected Flow version: |
Description
After submitting an empty form field of an integer property i get the following error:
#1244465559: Expected property of type integer, but got string
F3\FLOW3\Persistence\Exception\UnexpectedTypeException thrown in file
Packages/Framework/FLOW3/Classes/Persistence/Backend/AbstractBackend.php in line 278.
F3\FLOW3\Persistence\Backend\AbstractBackend::checkType("integer", "")
After changing the property type to string it validates the Object.
Flow3/PHP is converting empty form fields to empty strings "". It would be better if they are treated as NULL. (Validation actually checks for NULL)
Related issues
Associated revisions
[+FEATURE] FLOW3 (MVC): Convert controller arguments into their declared data type
Controller Arguments are now converted into real integers, floats and booleans if
they wered declared as such in the type hint or @param annotation.
Empty values are now detected as such and result in NULL as the argument's value.
Change-Id: I3deace5bb0e40a7e0fb7e2302d4995d8f74f0009
Resolves: #9456
Fixes: #6195
[+FEATURE] FLOW3 (MVC): Convert controller arguments into their declared data type
Controller Arguments are now converted into real integers, floats and booleans if
they wered declared as such in the type hint or @param annotation.
Empty values are now detected as such and result in NULL as the argument's value.
Change-Id: I3deace5bb0e40a7e0fb7e2302d4995d8f74f0009
Resolves: #9456
Fixes: #6195
History
#1 Updated by Robert Lemke over 5 years ago
- Subject changed from Empty From Fields to Empty Form Fields
#2 Updated by Karsten Dambekalns over 5 years ago
- Subject changed from Empty Form Fields to Empty form fields converted to empty string instead of type declared for property
- Category changed from MVC to Property
- Priority changed from Must have to Should have
- Start date deleted (
2010-01-24)
#3 Updated by Robert Lemke about 5 years ago
- Target version set to 1.0 alpha 11
#4 Updated by Karsten Dambekalns almost 5 years ago
- Target version deleted (
1.0 alpha 11)
#5 Updated by Robert Lemke almost 5 years ago
- Status changed from New to Accepted
- Assigned To set to Robert Lemke
- Target version set to 1.0 alpha 11
#6 Updated by Robert Lemke almost 5 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset 112feeea56d696abf05ceeda158fec6f879c0b50.