From 85e8a350916844fdf07b3aa527c09efac3720b7f Mon Sep 17 00:00:00 2001 From: iglocska Date: Sun, 18 Sep 2022 18:27:00 +0200 Subject: [PATCH] fix: [api rearrange] shouldn't trigger when dealing with arrays --- src/Controller/Component/RestResponseComponent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller/Component/RestResponseComponent.php b/src/Controller/Component/RestResponseComponent.php index 0ca239a..db5072b 100644 --- a/src/Controller/Component/RestResponseComponent.php +++ b/src/Controller/Component/RestResponseComponent.php @@ -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);