Merge pull request #6524 from gggeek/gg/issue-6413-improved

DockerController: avoid php warning when id not in query string in GetLogs Route
This commit is contained in:
Simon L. 2025-06-11 09:52:30 +02:00 committed by GitHub
commit 061885c8e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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 {