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 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'); } }