Changeset 406


Ignore:
Timestamp:
Mar 31, 2004, 11:03:03 PM (20 years ago)
Author:
z0rglub
Message:

PHP Warning correction

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

Legend:

Unmodified
Added
Removed
  • branches/release-1_3/include/functions_category.inc.php

    r320 r406  
    108108      if ( $info == 'uc.date_last' )
    109109      {
    110         list($year,$month,$day) = explode( '-', $row['date_last'] );
    111         $category['date_last'] = mktime(0,0,0,$month,$day,$year);
     110        if ( isset( $row['date_last'] ) and $row['date_last'] != '' )
     111        {
     112          list($year,$month,$day) = explode( '-', $row['date_last'] );
     113          $category['date_last'] = mktime(0,0,0,$month,$day,$year);
     114        }
    112115      }
    113116      else if ( isset( $row[$info] ) ) $category[$info] = $row[$info];
  • branches/release-1_3/template/default/htmlfunctions.inc.php

    r290 r406  
    2626{
    2727  global $user, $conf;
     28
     29  if ( !is_numeric( $date_comparaison ) )
     30  {
     31    return '';
     32  }
     33 
    2834  $difference = time() - $date_comparaison;
    2935  $jours = 24*60*60;
     
    231237  }
    232238  $vtp->setVar( $handle, 'category.total_cat', $category['nb_images'] );
    233   $vtp->setVar( $handle, 'category.cat_icon',get_icon($category['date_last']));
     239  if ( isset( $category['date_last'] ) )
     240  {
     241    $vtp->setVar($handle,'category.cat_icon',get_icon($category['date_last']));
     242  }
    234243  $vtp->closeSession( $handle, 'category' );
    235244
Note: See TracChangeset for help on using the changeset viewer.