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-Tag: v1.5.0-rc1~89 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=27dd1a83cbedb65d7116814ef2c0bf9d4986c8f5;p=git.git 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/gitweb.perl b/gitweb/gitweb.perl index 217905428..fd671f3eb 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -2813,8 +2813,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" .