fix: deprecation warning

pull/80/head
Luciano Righetti 2022-01-05 17:44:24 +01:00
parent a473a9d3fb
commit f45727704f
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ class ParamHandlerComponent extends Component
return $this->isRest;
}
if ($this->request->is('json')) {
if (!empty($this->request->input()) && empty($this->request->input('json_decode'))) {
if (!empty($this->request->getBody()) && !empty($this->request->getParsedBody())) {
throw new MethodNotAllowedException('Invalid JSON input. Make sure that the JSON input is a correctly formatted JSON string. This request has been blocked to avoid an unfiltered request.');
}
$this->isRest = true;