Bug #6195

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

Added by Fabian Guth over 11 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
#1

Updated by Robert Lemke over 11 years ago

  • Subject changed from Empty From Fields to Empty Form Fields
#2

Updated by Karsten Dambekalns over 11 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 over 11 years ago

  • Target version set to 1.0 alpha 11
#4

Updated by Karsten Dambekalns about 11 years ago

  • Target version deleted (1.0 alpha 11)
#5

Updated by Robert Lemke about 11 years ago

  • Status changed from New to Accepted
  • Assignee set to Robert Lemke
  • Target version set to 1.0 alpha 11
#6

Updated by Robert Lemke about 11 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF