Bug #6195

Empty form fields converted to empty string instead of type declared for property

Added by Fabian Guth almost 12 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Property
Start date:
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

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

Related to TYPO3.Flow - Feature #9456: MVC arguments should be converted to their target typeResolvedRobert Lemke2010-08-25

Actions

Also available in: Atom PDF