AccountController: Don't try to set a storage if there's none
This commit is contained in:
parent
6633bde9e9
commit
744fe5977f
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue