From: Jakub Narebski Date: Wed, 3 Jan 2007 21:54:29 +0000 (+0100) Subject: gitweb: Fix "Use of uninitialized value" warning in git_tags_body X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/36ccf91d9dc29d8de089c4f4a169544589688c389212d8ebcdc47b887e9edcfc gitweb: Fix "Use of uninitialized value" warning in git_tags_body Fix "Use of uninitialized value" warning in git_tags_body generated for lightweight tags of tree and blob object; those don't have age ($tag{'age'}) defined. Signed-off-by: Jakub Narebski Signed-off-by: Junio C Hamano --- diff --git a/gitweb.perl b/gitweb.perl index 716d416..e607099 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -2814,8 +2814,12 @@ sub git_tags_body { print "\n"; } $alternate ^= 1; - print "$tag{'age'}\n" . - "" . + if (defined $tag{'age'}) { + print "$tag{'age'}\n"; + } else { + print "\n"; + } + print "" . $cgi->a({-href => href(action=>$tag{'reftype'}, hash=>$tag{'refid'}), -class => "list name"}, esc_html($tag{'name'})) . "\n" .