The messaging preferences doesn't always seem to show the
email settings during behat tests and when updating details
will throw a warning.
Part of MDL-45774.
print_error('cannotupdateusermsgpref');
}
- $user->mailformat = clean_param($form->mailformat, PARAM_INT);
+ if (isset($form->mailformat)) {
+ $user->mailformat = clean_param($form->mailformat, PARAM_INT);
+ }
user_update_user($user, false, false);
redirect("$CFG->wwwroot/message/edit.php?id=$user->id");