From 9c557066bcd42a3dbc2df8a6b2b6462ca64b7e97 Mon Sep 17 00:00:00 2001 From: Git'Fellow <12234510+solracsf@users.noreply.github.com> Date: Mon, 9 Sep 2024 19:50:11 +0200 Subject: [PATCH] fix(appstore): Ensure returned apps from AppStore are valid Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: lint chore: remove space Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: check if response array is null Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> chore: Add log --- lib/private/App/AppStore/Fetcher/AppFetcher.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/App/AppStore/Fetcher/AppFetcher.php b/lib/private/App/AppStore/Fetcher/AppFetcher.php index ae36d849c5e..d2c98c4afc9 100644 --- a/lib/private/App/AppStore/Fetcher/AppFetcher.php +++ b/lib/private/App/AppStore/Fetcher/AppFetcher.php @@ -53,7 +53,8 @@ class AppFetcher extends Fetcher { /** @var mixed[] $response */ $response = parent::fetch($ETag, $content); - if (empty($response)) { + if (empty($response) || $response['data'] === null) { + $this->logger->warning('Response from appstore is invalid, apps could not be retrieved. Try again later.', ['app' => 'appstoreFetcher']); return []; }