Skip to content

Commit bb04b67

Browse files
authored
Merge pull request #29669 from nextcloud/backport/29664/stable20
[stable20] Fix updating with apps
2 parents f77bd43 + b89e548 commit bb04b67

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
@@ -466,7 +466,7 @@ private function upgradeAppStoreApps(array $apps, array $previousEnableStates =
466466

467467
if (!empty($previousEnableStates)) {
468468
$ocApp = new \OC_App();
469-
if (!empty($previousEnableStates[$app])) {
469+
if (!empty($previousEnableStates[$app]) && is_array($previousEnableStates[$app])) {
470470
$ocApp->enable($app, $previousEnableStates[$app]);
471471
} else {
472472
$ocApp->enable($app);

0 commit comments

Comments
 (0)