From 744fe5977f2a86d5995c7f9369c2fb904d928863 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 2 Nov 2021 13:28:52 +0100 Subject: [PATCH 1/2] AccountController: Don't try to set a storage if there's none --- application/controllers/AccountController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/AccountController.php b/application/controllers/AccountController.php index 9f247dcd3..4dc655452 100644 --- a/application/controllers/AccountController.php +++ b/application/controllers/AccountController.php @@ -69,7 +69,7 @@ class AccountController extends Controller $form = new PreferenceForm(); $form->setPreferences($user->getPreferences()); - if ($config->get('config_backend', 'db') !== 'none') { + if ($config->get('config_backend', 'db') !== 'none' && isset($config->config_resource)) { $form->setStore(PreferencesStore::create(new ConfigObject(array( 'store' => $config->get('config_backend', 'db'), 'resource' => $config->config_resource From 16f1f51f6629511b83f457d0eec143d28c6a8a77 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 2 Nov 2021 13:29:36 +0100 Subject: [PATCH 2/2] GeneralConfigForm: Fix error if there's no config.ini --- application/forms/Config/GeneralConfigForm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/forms/Config/GeneralConfigForm.php b/application/forms/Config/GeneralConfigForm.php index 57c1a4cbc..18d379094 100644 --- a/application/forms/Config/GeneralConfigForm.php +++ b/application/forms/Config/GeneralConfigForm.php @@ -42,7 +42,7 @@ class GeneralConfigForm extends ConfigForm { parent::onRequest(); - if ($this->config->getConfigObject()->global->config_backend === 'ini') { + if ($this->config->get('global', 'config_backend') === 'ini') { $this->warning('The preferences backend of type INI is deprecated and will be removed with version 2.11'); } }