[BUGFIX] Allow empty upload fields with PSR-7 90/41190/7
authorBenjamin Mack <benni@typo3.org>
Tue, 14 Jul 2015 12:29:25 +0000 (14:29 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Tue, 14 Jul 2015 16:38:48 +0000 (18:38 +0200)
commit9a198c813d048789df46cccabbe76405f9709316
tree3bb755501e38e10da62cbb74e159c3aba54d88ae
parent3ec1db06931bf15fa4936d25210ef3859d107ed6
[BUGFIX] Allow empty upload fields with PSR-7

When editing a record with a regular file upload field (e.g.
a fe_users record with property image), and one does not choose
to upload a file, the PSR-7 implementation currently restricts
this. The $_FILES array is filled with an empty data set.

Thus, PSR-7 is actually canceling the whole request instead
of letting it bypass, like the DataHandler would do the same
when trying to process the uploaded files later.

The patch allows the PSR-7 implementation only to add
the files that have a filename (tmp_name) given.

Resolves: #68118
Releases: master
Change-Id: Ifdf9a59040ba6af3ca7214709f34e2e5be7f5759
Reviewed-on: http://review.typo3.org/41190
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/core/Classes/Http/ServerRequestFactory.php
typo3/sysext/core/Tests/Unit/Http/ServerRequestFactoryTest.php