From: Adrian Greeve Date: Thu, 9 Apr 2015 02:24:32 +0000 (+0800) Subject: MDL-49412 navigation: Isset check on email setting. X-Git-Tag: v2.9.0-beta~34^2~17 X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=commitdiff_plain;h=06347532f0cb8a5e2e2d58e035e7c8bcd7e522a7 MDL-49412 navigation: Isset check on email setting. 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. --- diff --git a/message/edit.php b/message/edit.php index fc6b01e6138..4d1b54ff178 100644 --- a/message/edit.php +++ b/message/edit.php @@ -130,7 +130,9 @@ if (($form = data_submitted()) && confirm_sesskey()) { 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");