]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: fix use of uninitialized value.
authorJunio C Hamano <redacted>
Tue, 1 Aug 2006 02:24:37 +0000 (19:24 -0700)
committerLady <redacted>
Mon, 6 Apr 2026 04:05:46 +0000 (00:05 -0400)
Signed-off-by: Junio C Hamano <redacted>
gitweb.cgi

index d642ca589ed2d5c300c1853e93e7a7c127a65b28ab75db399f20ca42da4a1ba6..59c3c7ebd510015058975127f9b013d959668b8fcedb2bd9fce15b7ddb1641f0 100755 (executable)
@@ -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);
This page took 0.23939 seconds and 4 git commands to generate.