]> git.mxchange.org Git - friendica.git/commitdiff
don't try to use the Config table if it doesn't exist
authorPhilipp <admin@philipp.info>
Sun, 12 Feb 2023 15:23:51 +0000 (16:23 +0100)
committerPhilipp <admin@philipp.info>
Sun, 12 Feb 2023 15:23:51 +0000 (16:23 +0100)
src/Core/Update.php

index cef72f34bfda023e848f57c8878808452d307d35..0f0484b4e7efb1764d03a54c5d81f46cdcfc9c0a 100644 (file)
@@ -132,7 +132,7 @@ class Update
                $build = DI::config()->get('system', 'build');
 
                if (empty($build)) {
-                       // legacy option - check if there's something in the Config table
+                       // legacy option - check if the Config table exists
                        if (DBStructure::existsTable('config')) {
                                $dbConfig = DBA::selectFirst('config', ['v'], ['cat' => 'system', 'k' => 'build']);
                                if (!empty($dbConfig)) {
@@ -141,7 +141,10 @@ class Update
                        }
 
                        if (empty($build) || ($build > DB_UPDATE_VERSION)) {
-                               DI::config()->set('system', 'build', DB_UPDATE_VERSION - 1);
+                               // legacy option - check if the Config table exists
+                               if (DBStructure::existsTable('config')) {
+                                       DI::config()->set('system', 'build', DB_UPDATE_VERSION - 1);
+                               }
                                $build = DB_UPDATE_VERSION - 1;
                        }
                }