Skip to content

Commit 3aef5ac

Browse files
authored
Merge pull request #46577 from nextcloud/backport/46555/stable28
[stable28] fix(appstore): Return an empty array in case of fail
2 parents 71f4e01 + e4a67f2 commit 3aef5ac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/private/App/AppStore/Fetcher/AppFetcher.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ public function get($allowUnstable = false) {
185185
$allowPreReleases = $allowUnstable || $this->getChannel() === 'beta' || $this->getChannel() === 'daily' || $this->getChannel() === 'git';
186186

187187
$apps = parent::get($allowPreReleases);
188+
if (empty($apps)) {
189+
$this->logger->warning('Could not get apps from the appstore', ['app' => 'appstoreFetcher']);
190+
return [];
191+
}
188192
$allowList = $this->config->getSystemValue('appsallowlist');
189193

190194
// If the admin specified a allow list, filter apps from the appstore

0 commit comments

Comments
 (0)