summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2007-01-03 22:54:29 +0100
committerJunio C Hamano <junkio@cox.net>2007-01-04 23:19:09 -0800
commit27dd1a83cbedb65d7116814ef2c0bf9d4986c8f5 (patch)
tree7e0c8637b9f0f3178213ca47c3c8df6052cd2d68 /gitweb
parent2a3240beaad73dd86d9220c8a8a6e76c6d034a57 (diff)
downloadgit-27dd1a83cbedb65d7116814ef2c0bf9d4986c8f5.tar.gz
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 <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl8
1 files changed, 6 insertions, 2 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 2179054286..fd671f3eb2 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2813,8 +2813,12 @@ sub git_tags_body {
print "<tr class=\"light\">\n";
}
$alternate ^= 1;
- print "<td><i>$tag{'age'}</i></td>\n" .
- "<td>" .
+ if (defined $tag{'age'}) {
+ print "<td><i>$tag{'age'}</i></td>\n";
+ } else {
+ print "<td></td>\n";
+ }
+ print "<td>" .
$cgi->a({-href => href(action=>$tag{'reftype'}, hash=>$tag{'refid'}),
-class => "list name"}, esc_html($tag{'name'})) .
"</td>\n" .