mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
MVC - minor bugfix in ApiControllerBase->parseJsonBodyData() when $jsonRawBody isn't of array type we should skip merging entries.
This commit is contained in:
parent
47eac7dbf8
commit
6ac82416d7
@ -127,7 +127,7 @@ class ApiControllerBase extends ControllerRoot
|
||||
if (empty($this->request->getRawBody()) && empty($jsonRawBody)) {
|
||||
return "Invalid JSON syntax";
|
||||
}
|
||||
$_POST = $jsonRawBody;
|
||||
$_POST = is_array($jsonRawBody) ? $jsonRawBody : [];
|
||||
foreach ($_POST as $key => $value) {
|
||||
$_REQUEST[$key] = $value;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user