From 8eea263d710f625f5c57a1c3f8796499711a7fce Mon Sep 17 00:00:00 2001 From: Ceeram Date: Wed, 22 Feb 2012 22:49:42 +0100 Subject: [PATCH] fixing incorrect post data --- lib/Cake/Network/CakeRequest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Network/CakeRequest.php b/lib/Cake/Network/CakeRequest.php index 0fbc2855a..2aac0f233 100644 --- a/lib/Cake/Network/CakeRequest.php +++ b/lib/Cake/Network/CakeRequest.php @@ -147,7 +147,7 @@ class CakeRequest implements ArrayAccess { * process the post data and set what is there into the object. * processed data is available at `$this->data` * - * Will merge POST vars prefixed with `data`, and ones without + * Will merge POST vars prefixed with `data`, and ones without * into a single array. Variables prefixed with `data` will overwrite those without. * * If you have mixed POST values be careful not to make any top level keys numeric @@ -178,8 +178,7 @@ class CakeRequest implements ArrayAccess { } if (count($this->data) <= 1) { $this->data = $data; - } - if (count($this->data) > 1) { + } else { unset($this->data['data']); $this->data = Set::merge($this->data, $data); }