Merge pull request #48866 from nextcloud/backport/48853/stable30

[stable30] fix(app-store): Ensure the `groups` property is always an array
pull/48834/head
Ferdinand Thiessen 2024-10-23 19:08:38 +07:00 committed by GitHub
commit 7b2a614ca5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

@ -320,6 +320,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'];