From 155fb9c10f6cc7fad794c3ff21f94313aee4e514 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 14 Oct 2008 19:55:55 +0000 Subject: [PATCH] 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 --- core/control/Director.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/control/Director.php b/core/control/Director.php index 1cb88b07a..b7cd2ae3f 100644 --- a/core/control/Director.php +++ b/core/control/Director.php @@ -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) {