Browse Source

Merge pull request #48853 from nextcloud/fix/app-store-groups

fix(app-store): Ensure the `groups` property is always an array
pull/48867/head
Ferdinand Thiessen 12 months ago
committed by GitHub
parent
commit
1f1760454f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      apps/settings/lib/Controller/AppSettingsController.php

4
apps/settings/lib/Controller/AppSettingsController.php

@ -307,6 +307,10 @@ class AppSettingsController extends Controller {
$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'];

Loading…
Cancel
Save