Skip to content

Commit

Permalink
Merge pull request #48866 from nextcloud/backport/48853/stable30
Browse files Browse the repository at this point in the history
[stable30] fix(app-store): Ensure the `groups` property is always an array
  • Loading branch information
susnux authored Oct 23, 2024
2 parents 82398a6 + 35a1d4b commit 7b2a614
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/settings/lib/Controller/AppSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ public function listApps(): JSONResponse {
$groups = [];
if (is_string($appData['groups'])) {
$groups = json_decode($appData['groups']);
// ensure 'groups' is an array
if (!is_array($groups)) {
$groups = [$groups];
}
}
$appData['groups'] = $groups;
$appData['canUnInstall'] = !$appData['active'] && $appData['removable'];
Expand Down

0 comments on commit 7b2a614

Please sign in to comment.