Skip to content

Commit 5cb7d24

Browse files
authored
Merge pull request #29668 from nextcloud/backport/29664/stable21
[stable21] Fix updating with apps
2 parents 7bee566 + fd30500 commit 5cb7d24

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/private/App/AppManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public function getAppRestriction(string $appId): array {
204204
if ($values[$appId] === 'yes' || $values[$appId] === 'no') {
205205
return [];
206206
}
207-
return json_decode($values[$appId]);
207+
return json_decode($values[$appId], true);
208208
}
209209

210210

lib/private/Updater.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ private function upgradeAppStoreApps(array $apps, array $previousEnableStates =
427427

428428
if (!empty($previousEnableStates)) {
429429
$ocApp = new \OC_App();
430-
if (!empty($previousEnableStates[$app])) {
430+
if (!empty($previousEnableStates[$app]) && is_array($previousEnableStates[$app])) {
431431
$ocApp->enable($app, $previousEnableStates[$app]);
432432
} else {
433433
$ocApp->enable($app);

0 commit comments

Comments
 (0)