aboutsummaryrefslogtreecommitdiffstats
path: root/template/default
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-03-31 21:03:03 +0000
committerz0rglub <z0rglub@piwigo.org>2004-03-31 21:03:03 +0000
commitfdbb2d6681d9242828b2bd57f065c7cba3325858 (patch)
treee99fc7ed33ccb3e8a682fd6e8e505640bd719f5c /template/default
parent576cdcdb09e556bfd6f19d93998480f0438a37a5 (diff)
PHP Warning correction
git-svn-id: http://piwigo.org/svn/branches/release-1_3@406 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'template/default')
-rw-r--r--template/default/htmlfunctions.inc.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/template/default/htmlfunctions.inc.php b/template/default/htmlfunctions.inc.php
index ad52bfc13..e37597835 100644
--- a/template/default/htmlfunctions.inc.php
+++ b/template/default/htmlfunctions.inc.php
@@ -25,6 +25,12 @@ $user['lien_collapsed']='./template/'.$user['template'].'/theme/collapsed.gif';
function get_icon( $date_comparaison )
{
global $user, $conf;
+
+ if ( !is_numeric( $date_comparaison ) )
+ {
+ return '';
+ }
+
$difference = time() - $date_comparaison;
$jours = 24*60*60;
$output = '';
@@ -230,7 +236,10 @@ function display_category( $category, $indent, $handle )
$vtp->closeSession( $handle, 'subcat' );
}
$vtp->setVar( $handle, 'category.total_cat', $category['nb_images'] );
- $vtp->setVar( $handle, 'category.cat_icon',get_icon($category['date_last']));
+ if ( isset( $category['date_last'] ) )
+ {
+ $vtp->setVar($handle,'category.cat_icon',get_icon($category['date_last']));
+ }
$vtp->closeSession( $handle, 'category' );
// recursive call