aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-10-23 17:04:18 +0200
committerGitHub <noreply@github.com>2024-10-23 17:04:18 +0200
commit1f1760454febe04a42ef4f200ba8389b1f188c15 (patch)
treebf3fd58b243d344943698fa1577c9f63ec108003
parentd915a7ce0e3c6d333ac366d8e0c569ada5655d9b (diff)
parent9955b135642a805ff5fc3ec91ba1d969b7385c5e (diff)
downloadnextcloud-server-1f1760454febe04a42ef4f200ba8389b1f188c15.tar.gz
nextcloud-server-1f1760454febe04a42ef4f200ba8389b1f188c15.zip
Merge pull request #48853 from nextcloud/fix/app-store-groups
fix(app-store): Ensure the `groups` property is always an array
-rw-r--r--apps/settings/lib/Controller/AppSettingsController.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/settings/lib/Controller/AppSettingsController.php b/apps/settings/lib/Controller/AppSettingsController.php
index 7a1e5dd7157..b70978a3b92 100644
--- a/apps/settings/lib/Controller/AppSettingsController.php
+++ b/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'];