From 46b059d718777ab146b8089afd3d2fcdd6000154 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 31 Jul 2006 19:24:37 -0700 Subject: [PATCH] gitweb: fix use of uninitialized value. Signed-off-by: Junio C Hamano --- gitweb/gitweb.cgi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi index 902b96a91..f65b5d5ce 100755 --- a/gitweb/gitweb.cgi +++ b/gitweb/gitweb.cgi @@ -779,9 +779,11 @@ sub mimetype_guess_file { open(MIME, $mimemap) or return undef; while () { my ($mime, $exts) = split(/\t+/); - my @exts = split(/\s+/, $exts); - foreach my $ext (@exts) { - $mimemap{$ext} = $mime; + if (defined $exts) { + my @exts = split(/\s+/, $exts); + foreach my $ext (@exts) { + $mimemap{$ext} = $mime; + } } } close(MIME); -- 2.26.2