Commit 445c8b5d authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan
Browse files

submitting the form now works when not all the fields are set (so it works without the language)

parent 1a734f47
......@@ -190,7 +190,9 @@ function accountprefs_submit(Pieform $form, $values) {
// use this as looping through values is not safe.
$expectedprefs = expected_account_preferences();
foreach (array_keys($expectedprefs) as $pref) {
$USER->set_account_preference($pref, $values[$pref]);
if (isset($values[$pref])) {
$USER->set_account_preference($pref, $values[$pref]);
}
}
db_commit();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment