[BUGFIX] RequestBuilder must not call $request->setMethod with NULL
authorAlexander Schnitzler <alex.schnitzler@typovision.de>
Sat, 13 Apr 2013 09:05:19 +0000 (11:05 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 13 Apr 2013 09:29:29 +0000 (11:29 +0200)
commit2e3bea68ea23033eb1a5b300116016d208b55ecb
tree830cc516253c4adc62af9d7e1e18a7f7efbf3c92
parent87e395215910906ab66edcc97b5c8c06a9d02ece
[BUGFIX] RequestBuilder must not call $request->setMethod with NULL

If running a cli script the variable $_SERVER['REQUEST_METHOD'] is
not set at all. So when dispatching a sub webrequest the variable is
still not set and the RequestBuilder sets the method of Request to
NULL which is not allowed.

Therefore the variable will now be fetched via the Enrivonment-
Service which detects if the variable is empty and falls back to
"GET".

Releases: 6.1, 6.0, 4.7, 1.3
Resolves: #13845
Change-Id: I5e33aba48605895f9eae1e3b710364091e7e84f0
Reviewed-on: https://review.typo3.org/19887
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/extbase/Classes/Mvc/Web/RequestBuilder.php
typo3/sysext/extbase/Classes/Service/EnvironmentService.php
typo3/sysext/extbase/Tests/Unit/Mvc/Web/RequestBuilderTest.php