fix: [api rearrange] shouldn't trigger when dealing with arrays

cli-modification-summary
iglocska 2022-09-18 18:27:00 +02:00
parent 370995ab50
commit 85e8a35091
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 1 additions and 1 deletions

View File

@ -558,7 +558,7 @@ class RestResponseComponent extends Component
if (!empty($errors)) {
$data['errors'] = $errors;
}
if (!$raw) {
if (!$raw && is_object($data)) {
$data = $this->APIRearrange->rearrangeForAPI($data);
}
return $this->__sendResponse($data, 200, $format, $raw, $download, $headers);