diff options
author | Joas Schilling <coding@schilljs.com> | 2019-12-03 19:11:42 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-12-03 19:11:42 +0100 |
commit | 15a85378484ba31ff5585fdda82d1f019181b9a2 (patch) | |
tree | 0e34689c59a6ff272643635f1f8af9dc31308c33 | |
parent | fb46f736962a13c09b145a4730cd99c2c71da2e2 (diff) | |
download | nextcloud-server-15a85378484ba31ff5585fdda82d1f019181b9a2.tar.gz nextcloud-server-15a85378484ba31ff5585fdda82d1f019181b9a2.zip |
Correctly remove apps without any releases
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | lib/private/App/AppStore/Fetcher/AppFetcher.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/App/AppStore/Fetcher/AppFetcher.php b/lib/private/App/AppStore/Fetcher/AppFetcher.php index cf5839e4994..7e188f0c1f5 100644 --- a/lib/private/App/AppStore/Fetcher/AppFetcher.php +++ b/lib/private/App/AppStore/Fetcher/AppFetcher.php @@ -106,6 +106,12 @@ class AppFetcher extends Fetcher { } } + if (empty($releases)) { + // Remove apps that don't have a matching release + $response['data'][$dataKey] = []; + continue; + } + // Get the highest version $versions = []; foreach($releases as $release) { @@ -129,7 +135,7 @@ class AppFetcher extends Fetcher { } } - $response['data'] = array_values($response['data']); + $response['data'] = array_values(array_filter($response['data'])); return $response; } |