diff --git a/mod/chat/gui_header_js/chatinput.php b/mod/chat/gui_header_js/chatinput.php
index <HASH>..<HASH> 100644
--- a/mod/chat/gui_header_js/chatinput.php
+++ b/mod/chat/gui_header_js/chatinput.php
@@ -5,6 +5,7 @@ require("../lib.php");
 
 require_variable($chat_sid);
 optional_variable($groupid);
+optional_variable($chat_pretext, '');
 
 if (!$chatuser = get_record("chat_users", "sid", $chat_sid)) {
     echo "Not logged in!";
Fix for bug <I>:

One notice in debug mode removed.