@matheusbsbs / matheus-bagliano / commits / 46b059d718
Fork 0

gitweb: fix use of uninitialized value.

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

Junio C Hamano committed Jul 31, 2006 at 19:24 UTC 46b059d718777ab146b8089afd3d2fcdd6000154
1 file changed +5 -3
gitweb/gitweb.cgi
+5 -3
@@ -779,9 +779,11 @@ sub mimetype_guess_file {
779 open(MIME, $mimemap) or return undef;
780 while (<MIME>) {
781 my ($mime, $exts) = split(/\t+/);
782 - my @exts = split(/\s+/, $exts);
783 - foreach my $ext (@exts) {
784 - $mimemap{$ext} = $mime;
782 + if (defined $exts) {
783 + my @exts = split(/\s+/, $exts);
784 + foreach my $ext (@exts) {
785 + $mimemap{$ext} = $mime;
786 + }
787 }
788 }
789 close(MIME);