mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Checking for an empty array for $postVars in Director::test() to determine HTTP method - an existing array should cause POST rather than GET, even if its empty
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64228 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0fac0752a4
commit
155fb9c10f
@ -151,7 +151,7 @@ class Director {
|
||||
// Really, it's some inapproriate coupling and should be resolved by making less use of statics
|
||||
$oldStage = Versioned::current_stage();
|
||||
|
||||
if(!$httpMethod) $httpMethod = $postVars ? "POST" : "GET";
|
||||
if(!$httpMethod) $httpMethod = ($postVars || is_array($postVars)) ? "POST" : "GET";
|
||||
|
||||
$getVars = array();
|
||||
if(strpos($url,'?') !== false) {
|
||||
|
Loading…
Reference in New Issue
Block a user