]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix updating with apps 29668/head
authorJoas Schilling <coding@schilljs.com>
Thu, 11 Nov 2021 12:56:42 +0000 (13:56 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Thu, 11 Nov 2021 13:45:54 +0000 (13:45 +0000)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/App/AppManager.php
lib/private/Updater.php

index ae5aeab98316f1efe8505007afa4204f49954ada..62e666699914f6781718c6cfd9e2e92a750d0a3e 100644 (file)
@@ -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);
        }
 
 
index 9c9da1f50c01f30f1472bfd06ce128ca711d84b1..a8711944341feb83b83462e0a8e4b2d9a42bd027 100644 (file)
@@ -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);