get rid of php warnings

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@627 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2009-08-11 16:10:22 +00:00
parent 31d23ce95d
commit f94b2879c5
5 changed files with 5 additions and 5 deletions

View File

@ -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');
}

View File

@ -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));
}

View File

@ -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';

View File

@ -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 "<!-- wrong $prefix:$var -->";
}

View File

@ -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'];