Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixing incorrect post data

  • Loading branch information...
commit 8eea263d710f625f5c57a1c3f8796499711a7fce 1 parent 9d71df4
ceeram ceeram authored markstory committed
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/Cake/Network/CakeRequest.php
5 lib/Cake/Network/CakeRequest.php
View
@@ -147,7 +147,7 @@ public function __construct($url = null, $parseEnvironment = true) {
* 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 @@ protected function _processPost() {
}
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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.