diff --git a/Message/Http/Request.php b/Message/Http/Request.php index 4c3f18b83..6e3026901 100644 --- a/Message/Http/Request.php +++ b/Message/Http/Request.php @@ -113,7 +113,7 @@ class Request extends RequestAbstract if (isset($_SERVER['CONTENT_TYPE'])) { if (strpos($_SERVER['CONTENT_TYPE'], 'application/json') !== false) { - if(($json = json_decode(($input = file_get_contents('php://input')), true)) === false || $json === null) { + if (($json = json_decode(($input = file_get_contents('php://input')), true)) === false || $json === null) { throw new \Exception('Is not valid json ' . $input); } @@ -132,6 +132,12 @@ class Request extends RequestAbstract $this->uri->set($uri['uri']); } + unset($_FILES); + unset($_GET); + unset($_POST); + unset($_PUT); + unset($_HEAD); + $this->path = explode('/', $this->uri->getPath()); $this->l11n->setLanguage($this->path[0]); $this->hash = [];