summaryrefslogtreecommitdiffstats
path: root/gitweb
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-01 04:24:37 +0200
committerJunio C Hamano <junkio@cox.net>2006-08-01 04:24:37 +0200
commit46b059d718777ab146b8089afd3d2fcdd6000154 (patch)
tree1226bfd569f8da3e5e21d017e6117fd501d4113e /gitweb
parentgitweb: an obvious cut and paste error. (diff)
downloadgit-46b059d718777ab146b8089afd3d2fcdd6000154.tar.xz
git-46b059d718777ab146b8089afd3d2fcdd6000154.zip
gitweb: fix use of uninitialized value.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.cgi8
1 files changed, 5 insertions, 3 deletions
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index 902b96a914..f65b5d5ce2 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -779,9 +779,11 @@ sub mimetype_guess_file {
open(MIME, $mimemap) or return undef;
while (<MIME>) {
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);