Skip to content
This repository
Browse code

fixing incorrect post data

  • Loading branch information...
commit 8eea263d710f625f5c57a1c3f8796499711a7fce 1 parent 9d71df4
ceeram authored February 22, 2012 markstory committed February 23, 2012

Showing 1 changed file with 2 additions and 3 deletions. Show diff stats Hide diff stats

  1. 5  lib/Cake/Network/CakeRequest.php
5  lib/Cake/Network/CakeRequest.php
@@ -147,7 +147,7 @@ public function __construct($url = null, $parseEnvironment = true) {
147 147
  * process the post data and set what is there into the object.
148 148
  * processed data is available at `$this->data`
149 149
  *
150  
- * Will merge POST vars prefixed with `data`, and ones without 
  150
+ * Will merge POST vars prefixed with `data`, and ones without
151 151
  * into a single array. Variables prefixed with `data` will overwrite those without.
152 152
  *
153 153
  * If you have mixed POST values be careful not to make any top level keys numeric
@@ -178,8 +178,7 @@ protected function _processPost() {
178 178
 		}
179 179
 		if (count($this->data) <= 1) {
180 180
 			$this->data = $data;
181  
-		}
182  
-		if (count($this->data) > 1) {
  181
+		} else {
183 182
 			unset($this->data['data']);
184 183
 			$this->data = Set::merge($this->data, $data);
185 184
 		}

0 notes on commit 8eea263

Please sign in to comment.
Something went wrong with that request. Please try again.