diff --git a/XMPPHP/XMPP.php b/XMPPHP/XMPP.php index a69a647..b96fe25 100644 --- a/XMPPHP/XMPP.php +++ b/XMPPHP/XMPP.php @@ -144,6 +144,11 @@ class XMPPHP_XMPP extends XMPPHP_XMLStream { * @param string $subject */ public function message($to, $body, $type = 'chat', $subject = null, $payload = null) { + if(is_null($type)) + { + $type = 'chat'; + } + $to = htmlspecialchars($to); $body = htmlspecialchars($body); $subject = htmlspecialchars($subject);