Merge tag 'v2.7.6' into maint-2.8
[gitweb.git] / gitweb / gitweb.perl
index 17ff394923bc0fcb6fe547ac42e7523f96b3dde1..2fddf750fabf9ac2d079777ad7bd7953c2477f9c 100755 (executable)
@@ -7579,7 +7579,7 @@ sub git_object {
                        git_cmd(), 'cat-file', '-t', $object_id) . ' 2> /dev/null'
                        or die_error(404, "Object does not exist");
                $type = <$fd>;
-               chomp $type;
+               defined $type && chomp $type;
                close $fd
                        or die_error(404, "Object does not exist");