From: Junio C Hamano Date: Tue, 1 Aug 2006 02:24:37 +0000 (-0700) Subject: gitweb: fix use of uninitialized value. X-Git-Tag: v1.4.3-rc1~274^2~29 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=46b059d718777ab146b8089afd3d2fcdd6000154;p=git.git gitweb: fix use of uninitialized value. Signed-off-by: Junio C Hamano --- 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);