From 06347532f0cb8a5e2e2d58e035e7c8bcd7e522a7 Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Thu, 9 Apr 2015 10:24:32 +0800 Subject: [PATCH] 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. --- message/edit.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"); -- 2.17.1