|
|
@@ -162,11 +162,12 @@ class CakeRequest implements ArrayAccess {
|
|
|
protected function _processPost() {
|
|
|
if ($_POST) {
|
|
|
$this->data = $_POST;
|
|
|
- } elseif ($this->is('put') || $this->is('delete')) {
|
|
|
- $this->data = $this->_readInput();
|
|
|
- if (strpos(env('CONTENT_TYPE'), 'application/x-www-form-urlencoded') === 0) {
|
|
|
- parse_str($this->data, $this->data);
|
|
|
- }
|
|
|
+ } elseif (
|
|
|
+ ($this->is('put') || $this->is('delete')) &&
|
|
|
+ strpos(env('CONTENT_TYPE'), 'application/x-www-form-urlencoded') === 0
|
|
|
+ ) {
|
|
|
+ $data = $this->_readInput();
|
|
|
+ parse_str($data, $this->data);
|
|
|
}
|
|
|
if (ini_get('magic_quotes_gpc') === '1') {
|
|
|
$this->data = stripslashes_deep($this->data);
|