Skip to content

Commit

Permalink
message MDL-25816 added safety checks in form processing
Browse files Browse the repository at this point in the history
  • Loading branch information
andyjdavis committed Feb 22, 2011
1 parent d20b966 commit 6c0f13a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion message/output/email/message_output_email.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ function config_form($preferences){
* @param array $preferences preferences array
*/
function process_form($form, &$preferences){
$preferences['message_processor_email_email'] = $form->email_email;
if (isset($form->email_email)) {
$preferences['message_processor_email_email'] = $form->email_email;
}
}

/**
Expand Down
4 changes: 3 additions & 1 deletion message/output/jabber/message_output_jabber.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ function config_form($preferences){
* @param array $preferences preferences array
*/
function process_form($form, &$preferences){
$preferences['message_processor_jabber_jabberid'] = $form->jabber_jabberid;
if (isset($form->jabber_jabberid)) {
$preferences['message_processor_jabber_jabberid'] = $form->jabber_jabberid;
}
}

/**
Expand Down

0 comments on commit 6c0f13a

Please sign in to comment.