Bug #36114

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

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

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

100%

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.Media - Bug #36115: TYPO3.Media: Properties cannot be mapped Closed 2012-04-15
Related to TYPO3.Flow - Task #36340: Environment class needs to be cleaned up Resolved 2012-04-19

Associated revisions

Revision 1256837a (diff)
Added by Bastian Waidelich over 7 years ago

[BUGFIX] Uploaded files are not untangled anymore

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) which causes an
exception.

Change-Id: I070263258be2f8cd32a16445aa45099d370aec4d
Fixes: #36114
Releases: 1.1

History

#1 Updated by Bastian Waidelich over 7 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 7 years ago

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

#3 Updated by Gerrit Code Review over 7 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 7 years ago

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

#5 Updated by Gerrit Code Review over 7 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 7 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 7 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 7 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 7 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 7 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 7 years ago

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

Also available in: Atom PDF