зеркало из https://github.com/nextcloud/server.git
Merge pull request #48866 from nextcloud/backport/48853/stable30
[stable30] fix(app-store): Ensure the `groups` property is always an array
This commit is contained in:
Коммит
7b2a614ca5
|
@ -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'];
|
||||
|
|
Загрузка…
Ссылка в новой задаче