From 9245b4d211ec6d76b865daf44880f5161cf3f114 Mon Sep 17 00:00:00 2001 From: Curtis Conard Date: Wed, 6 Nov 2024 11:04:22 -0500 Subject: [PATCH] fix response body from api --- src/Glpi/Controller/ApiController.php | 2 +- src/Glpi/Controller/StatusController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Glpi/Controller/ApiController.php b/src/Glpi/Controller/ApiController.php index 38eb90b38cc..fec31a8c16b 100644 --- a/src/Glpi/Controller/ApiController.php +++ b/src/Glpi/Controller/ApiController.php @@ -108,7 +108,7 @@ public function __invoke(SymfonyRequest $request): SymfonyResponse } return new SymfonyResponse( - $response->getBody()->getContents(), + (string) $response->getBody(), $response->getStatusCode(), $response->getHeaders() ); diff --git a/src/Glpi/Controller/StatusController.php b/src/Glpi/Controller/StatusController.php index a54f188771b..10af9982612 100644 --- a/src/Glpi/Controller/StatusController.php +++ b/src/Glpi/Controller/StatusController.php @@ -67,7 +67,7 @@ public function __invoke(SymfonyRequest $request): SymfonyResponse } return new SymfonyResponse( - $response->getBody()->getContents(), + (string) $response->getBody(), $response->getStatusCode(), $response->getHeaders() );