Code

gitweb: fix another use of undefined value
authorJunio C Hamano <junkio@cox.net>
Thu, 17 May 2007 04:04:16 +0000 (21:04 -0700)
committerJunio C Hamano <junkio@cox.net>
Thu, 17 May 2007 04:04:16 +0000 (21:04 -0700)
Pasky and Jakub competed fixing these and in the confusion this ended up
not being covered.

Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl

index 8c688be66d5a972d57c37031042bd5d56395a079..6f5df9174ec80d4decf4be8111f84e79411a156d 100755 (executable)
@@ -1114,7 +1114,9 @@ sub git_get_project_description {
        open my $fd, "$projectroot/$path/description" or return undef;
        my $descr = <$fd>;
        close $fd;
-       chomp $descr;
+       if (defined $descr) {
+               chomp $descr;
+       }
        return $descr;
 }