diff --git a/src/Web/Actions/IndexAction.php b/src/Web/Actions/IndexAction.php index 7ca444b43..4628015d4 100644 --- a/src/Web/Actions/IndexAction.php +++ b/src/Web/Actions/IndexAction.php @@ -33,8 +33,12 @@ class IndexAction extends Action ]; $response = $this->callAction('Flarum\Api\Actions\Users\ShowAction', ['id' => $user->id]); + $response = $response->getData(); - $data = array_merge([$response->getData()->data], $response->getData()->included); + $data = [$response->data]; + if (isset($response->included)) { + $data = array_merge($data, $response->included); + } }