Ignore:
Timestamp:
Jan 19, 2004, 11:33:26 PM (21 years ago)
Author:
z0rglub
Message:

Php warnings corrections

Location:
branches/release-1_3/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/release-1_3/admin/configuration.php

    r283 r304  
    241241{
    242242//--------------------------------------------------------- data initialization
    243   $query  = 'SELECT';
    244   foreach ( $conf_infos as $i => $conf_info ) {
    245     if ( $i > 0 ) $query.= ',';
    246     else          $query.= ' ';
    247     $query.= $conf_info;
    248   }
     243  $query  = 'SELECT '.implode( ',', $conf_infos );
    249244  $query .= ' FROM '.PREFIX_TABLE.'config;';
    250245  $row = mysql_fetch_array( mysql_query( $query ) );
    251   foreach ( $conf_infos as $conf_info ) {
    252     $$conf_info = $row[$conf_info];
    253   }
    254 
    255   $query  = 'SELECT';
    256   foreach ( $default_user_infos as $i => $default_user_info ) {
    257     if ( $i > 0 ) $query.= ',';
    258     else          $query.= ' ';
    259     $query.= $default_user_info;
    260   }
     246  foreach ( $conf_infos as $info ) {
     247    if ( isset( $row[$info] ) ) $$info = $row[$info];
     248    else                        $$info = '';
     249  }
     250
     251  $query  = 'SELECT '.implode( ',', $default_user_infos );
    261252  $query.= ' FROM '.PREFIX_TABLE.'users';
    262253  $query.= " WHERE username = 'guest'";
    263254  $query.= ';';
    264255  $row = mysql_fetch_array( mysql_query( $query ) );
    265   foreach ( $default_user_infos as $default_user_info ) {
    266     $$default_user_info = $row[$default_user_info];
     256  foreach ( $default_user_infos as $info ) {
     257    if ( isset( $row[$info] ) ) $$info = $row[$info];
     258    else                        $$info = '';
    267259  }
    268260}
  • branches/release-1_3/admin/user_list.php

    r280 r304  
    151151    $vtp->addSession( $sub, 'user' );
    152152    // checkbox for mail management if the user has a mail address
    153     if ( $row['mail_address'] != '' and $row['username'] != 'guest' )
     153    if ( isset( $row['mail_address'] ) and $row['username'] != 'guest' )
    154154    {
    155155      $vtp->addSession( $sub, 'checkbox' );
Note: See TracChangeset for help on using the changeset viewer.