Bug #36114

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

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

Status:Resolved Start date:2012-04-15
Priority:Must have Due date:
Assigned To:Bastian Waidelich % Done:

100%

Category:Http
Target version:TYPO3 Flow Base Distribution - 1.1 beta 1
PHP Version: Complexity:medium
Has patch:No Affected Flow version:Git master

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 up Resolved 2012-04-19
related to TYPO3.Media - Bug #36115: TYPO3.Media: Properties cannot be mapped Closed 2012-04-15

Associated revisions

Revision 1256837a
Added by Bastian Waidelich over 3 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 3 years ago

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

another regression.. Thanks for reporting!

#2 Updated by Karsten Dambekalns over 3 years ago

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

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

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

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

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

Also available in: Atom PDF