Bug #36114

Property Mapping breaks for file uploads, because $_FILES-Array doesn't get "untangled" anymore

Added by Johannes K over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Must have
Category:
Http
Start date:
2012-04-15
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:
medium

Description

TYPO3\FLOW3\Http\Request is missing the functionality that is implemented in TYPO3\FLOW3\Utility\Environment::untangleFilesArray().

This causes the $source array in TYPO3\FLOW3\Property\PropertyMapper::convert() to have invalid keys from the $_FILES array (name, type, tmp_name, error, size) and causes this exception:
"#1297759968: Exception while property mapping at property path "": Property "name" was not found in target object of type Acme\Domain\Model\Event".

This is how $source look like:

array(15)
 '__identity' (10) => '3fbe7e6e-15dc-43af-93d5-6b6e173a58c4' (36)
 'title' (5) => 'Test' (8)
...
 'image' (5) => array(1)
   'resource' (8) => array(1)
     'submittedFile' (13) => array(2)
       'fileName' (8) => '' (0)
       'resourcePointer' (15) => '' (0)
 'name' (4) => array(1)
   'image' (5) => array(1)
     'resource' (8) => '' (0)
 'type' (4) => array(1)
   'image' (5) => array(1)
     'resource' (8) => '' (0)
 'tmp_name' (8) => array(1)
   'image' (5) => array(1)
     'resource' (8) => '' (0)
 'error' (5) => array(1)
   'image' (5) => array(1)
     'resource' (8) => integer 4
 'size' (4) => array(1)
   'image' (5) => array(1)
     'resource' (8) => integer 0


Related issues

Related to TYPO3.Flow - Task #36340: Environment class needs to be cleaned upResolvedKarsten Dambekalns2012-04-19

Actions

Also available in: Atom PDF