]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix updating with apps 29666/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:39:22 +0000 (13:39 +0000)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/App/AppManager.php
lib/private/Updater.php

index b1f3097cc3d94f492b225b2759da9d249cfab762..f154bd854ada0e77df6694182cdc48da9dd100d6 100644 (file)
@@ -195,7 +195,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 2c5820fdd8bccdf07ebcd25f14ae61947ecda2c3..8f21e091650670e32237684a8df2485a21d0f581 100644 (file)
@@ -418,7 +418,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);