summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-11-11 13:56:42 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-11-11 13:45:54 +0000
commitfd30500a92e9d7681e9211157b4917441986d4ba (patch)
treee9bca476d6bbd24b19c7932d24f7e61f6cb818b6 /lib
parent7bee566e602fa474db142fbac01d33dc1dc9fe54 (diff)
downloadnextcloud-server-fd30500a92e9d7681e9211157b4917441986d4ba.tar.gz
nextcloud-server-fd30500a92e9d7681e9211157b4917441986d4ba.zip
Fix updating with apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/App/AppManager.php2
-rw-r--r--lib/private/Updater.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php
index ae5aeab9831..62e66669991 100644
--- a/lib/private/App/AppManager.php
+++ b/lib/private/App/AppManager.php
@@ -204,7 +204,7 @@ class AppManager implements IAppManager {
if ($values[$appId] === 'yes' || $values[$appId] === 'no') {
return [];
}
- return json_decode($values[$appId]);
+ return json_decode($values[$appId], true);
}
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index 9c9da1f50c0..a8711944341 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -427,7 +427,7 @@ class Updater extends BasicEmitter {
if (!empty($previousEnableStates)) {
$ocApp = new \OC_App();
- if (!empty($previousEnableStates[$app])) {
+ if (!empty($previousEnableStates[$app]) && is_array($previousEnableStates[$app])) {
$ocApp->enable($app, $previousEnableStates[$app]);
} else {
$ocApp->enable($app);