AccountController: Don't try to set a storage if there's none

This commit is contained in:
Johannes Meyer 2021-11-02 13:28:52 +01:00
parent 6633bde9e9
commit 744fe5977f
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ class AccountController extends Controller
$form = new PreferenceForm(); $form = new PreferenceForm();
$form->setPreferences($user->getPreferences()); $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( $form->setStore(PreferencesStore::create(new ConfigObject(array(
'store' => $config->get('config_backend', 'db'), 'store' => $config->get('config_backend', 'db'),
'resource' => $config->config_resource 'resource' => $config->config_resource