1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-23 13:46:09 +02:00

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>
This commit is contained in:
Jakub Narebski 2007-01-03 22:54:29 +01:00 committed by Junio C Hamano
parent 2a3240beaa
commit 27dd1a83cb

View File

@ -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" .