]> git.mxchange.org Git - friendica.git/commitdiff
Fix in case the storage config is set as file.
authornupplaPhil <admin@philipp.info>
Mon, 6 Jan 2020 22:23:44 +0000 (23:23 +0100)
committernupplaPhil <admin@philipp.info>
Fri, 10 Jan 2020 12:22:00 +0000 (13:22 +0100)
update.php

index 7d25c6ac0ea51eeefd3f4e8fbaabea25ae90f126..924fac54589533d29c12d7dad80c610618e2aa87 100644 (file)
@@ -416,10 +416,12 @@ function update_1330()
        // set the name of the storage instead of the classpath as config
        if (!empty($currStorage)) {
                /** @var Storage\IStorage $currStorage */
-               if (!Config::set('storage', 'name', $currStorage::getName()) ||
-                   !Config::delete('storage', 'class')) {
+               if (!Config::set('storage', 'name', $currStorage::getName())) {
                        return Update::FAILED;
-               };
+               }
+
+               // try to delete the class since it isn't needed. This won't work with config files
+               Config::delete('storage', 'class');
        }
 
        // Update attachments and photos