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
#1

Updated by Bastian Waidelich over 9 years ago

  • Status changed from New to Accepted
  • Assignee set to Bastian Waidelich
  • Complexity set to medium

another regression.. Thanks for reporting!

#2

Updated by Karsten Dambekalns over 9 years ago

The untangleFilesArray() is still in Environment but no longer used, it seems…

#3

Updated by Gerrit Code Review over 9 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10636

#4

Updated by Adrian Föder over 9 years ago

since you're working on it, you might wanna have a look at #35868, too.

#5

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10636

#6

Updated by Gerrit Code Review over 9 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10636

#7

Updated by Gerrit Code Review over 9 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10636

#8

Updated by Gerrit Code Review over 9 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10636

#9

Updated by Gerrit Code Review over 9 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10636

#10

Updated by Gerrit Code Review over 9 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10636

#11

Updated by Bastian Waidelich over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF