diff --git a/src/messenger/webim/leavemessage.php b/src/messenger/webim/leavemessage.php index 6d8043c7..6fd89a46 100644 --- a/src/messenger/webim/leavemessage.php +++ b/src/messenger/webim/leavemessage.php @@ -83,7 +83,7 @@ if( !$email ) { if($settings["enablecaptcha"] == "1" && can_show_captcha()) { $captcha = getparam('captcha'); - $original = $_SESSION['captcha']; + $original = isset($_SESSION['captcha']) ? $_SESSION['captcha'] : ""; if(empty($original) || empty($captcha) || $captcha != $original) { $errors[] = getlocal('errors.captcha'); } diff --git a/src/messenger/webim/libs/chat.php b/src/messenger/webim/libs/chat.php index 717ae8b9..cecc1237 100644 --- a/src/messenger/webim/libs/chat.php +++ b/src/messenger/webim/libs/chat.php @@ -288,7 +288,7 @@ function setup_leavemessage($name, $email, $message, $groupid, $groupname, $info $page['showcaptcha'] = $settings["enablecaptcha"] == "1" && $canshowcaptcha ? "1" : ""; $page['formgroupid'] = $groupid; $page['formgroupname'] = $groupname; - $page['forminfo'] = topage($info); + $page['info'] = topage($info); $page['referrer'] = urlencode(topage($referrer)); } diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index 18690fe2..71fd8454 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -549,7 +549,7 @@ function webim_mail($toaddr, $reply_to, $subject, $body) { $body = preg_replace("/\n/","\r\n", $body); - mail($toaddr, $real_subject, wordwrap(myiconv($webim_encoding, $mail_encoding, $body),70), $headers); + @mail($toaddr, $real_subject, wordwrap(myiconv($webim_encoding, $mail_encoding, $body),70), $headers); } $dbversion = '1.6.2'; diff --git a/src/messenger/webim/libs/expand.php b/src/messenger/webim/libs/expand.php index 86c16c8b..ceca1fbe 100644 --- a/src/messenger/webim/libs/expand.php +++ b/src/messenger/webim/libs/expand.php @@ -79,7 +79,7 @@ function expand_var($matches) { } else if($prefix == 'form:') { return form_value($var); } else if($prefix == 'page:') { - return $page[$var]; + return isset($page[$var]) ? $page[$var] : ""; } else if($prefix == 'if:' || $prefix == 'else:' || $prefix == 'endif:' || $prefix == 'ifnot:') { return ""; } diff --git a/src/messenger/webim/libs/groups.php b/src/messenger/webim/libs/groups.php index a5dc0725..f7c45c7f 100644 --- a/src/messenger/webim/libs/groups.php +++ b/src/messenger/webim/libs/groups.php @@ -29,7 +29,7 @@ function group_by_id($id) { function get_group_name($group) { global $home_locale, $current_locale; - if( $home_locale == $current_locale || !$group['vccommonname'] ) + if( $home_locale == $current_locale || !isset($group['vccommonname']) || !$group['vccommonname']) return $group['vclocalname']; else return $group['vccommonname'];