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:
Ingo Schommer 2008-10-14 19:55:55 +00:00
parent 0fac0752a4
commit 155fb9c10f

View File

@ -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) {