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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
0 deletions
-
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']; |
|
|
|