DockerController: avoid php warning when id not in query string in GetLogs Route

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
gggeek 2025-06-10 17:27:32 +00:00 committed by Simon L.
parent 2152d3544a
commit 1c5cc164c0

View file

@ -62,7 +62,11 @@ readonly class DockerController {
public function GetLogs(Request $request, Response $response, array $args) : Response
{
$id = $request->getQueryParams()['id'];
$requestParams = $request->getQueryParams();
$id = '';
if (is_string($requestParams['id'])) {
$id = $requestParams['id'];
}
if (str_starts_with($id, 'nextcloud-aio-')) {
$logs = $this->dockerActionManager->GetLogs($id);
} else {