Skip to content

Commit

Permalink
fixing incorrect post data
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram committed Feb 22, 2012
1 parent 2e2ee3b commit 55b8f66
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/Cake/Network/CakeRequest.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function __construct($url = null, $parseEnvironment = true) {
* process the post data and set what is there into the object. * process the post data and set what is there into the object.
* processed data is available at `$this->data` * 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. * 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 * If you have mixed POST values be careful not to make any top level keys numeric
Expand Down Expand Up @@ -179,8 +179,7 @@ protected function _processPost() {
} }
if (count($this->data) <= 1) { if (count($this->data) <= 1) {
$this->data = $data; $this->data = $data;
} } else {
if (count($this->data) > 1) {
unset($this->data['data']); unset($this->data['data']);
$this->data = Set::merge($this->data, $data); $this->data = Set::merge($this->data, $data);
} }
Expand Down

0 comments on commit 55b8f66

Please sign in to comment.