Changeset 12

Show
Ignore:
Timestamp:
11/12/07 12:17:35 (10 months ago)
Author:
david
Message:

fixes to ensure variables are defined

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/postfixadmin_forward.php

    r5 r12  
    3030} 
    3131 
     32$tMessage = ''; 
    3233 
    3334include_once (SM_PATH . 'plugins/postfixadmin/config.php'); 
     
    104105    $array = preg_split ('/,/', $goto); 
    105106 
     107    $error = 0; 
    106108    // array should be a list of valid email addresses... 
    107109    foreach($array as $email_address)  
  • trunk/postfixadmin_vacation.php

    r5 r12  
    9292    else 
    9393    { 
     94        $tMessage = ''; 
    9495        bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); 
    9596        textdomain('postfixadmin'); 
     
    126127if ($_SERVER['REQUEST_METHOD'] == "POST") 
    127128{ 
    128     $fSubject = db_escape($_POST['fSubject']); 
    129     $fBody = db_escape($_POST['fBody']); 
    130     $fAway = db_escape($_POST['fAway']); 
    131     $fBack = db_escape($_POST['fBack']); 
     129    $fBack = null; 
     130    $fAway = null; 
     131    foreach(array('fBack', 'fAway', 'fSubject', 'fBody') as $key) { 
     132        $$key = null; 
     133        if(isset($_POST[$key])) { 
     134            $$key = db_escape($_POST[$key]); 
     135        } 
     136    } 
     137     
    132138    $USERID_USERNAME = db_escape($USERID_USERNAME); 
    133139    $USERID_DOMAIN = db_escape($USERID_DOMAIN);