Merge branch 'MDL-25816_jabber_preference' of git://github.com/andyjdavis/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 22 Feb 2011 15:51:49 +0000 (16:51 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 22 Feb 2011 15:51:49 +0000 (16:51 +0100)
message/output/email/message_output_email.php
message/output/jabber/message_output_jabber.php

index 90bf792..dff4874 100644 (file)
@@ -85,7 +85,9 @@ class message_output_email extends message_output {
      * @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;
+        }
     }
 
     /**
index a6f9f65..945d790 100644 (file)
@@ -106,7 +106,9 @@ class message_output_jabber extends message_output {
      * @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;
+        }
     }
 
     /**