]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 190611: Query page crashes if any product has no versions defined; r...
authorjocuri%softhome.net <>
Sat, 1 Nov 2003 03:06:59 +0000 (03:06 +0000)
committerjocuri%softhome.net <>
Sat, 1 Nov 2003 03:06:59 +0000 (03:06 +0000)
query.cgi

index afdcf121563801fcddf4aa23003f1f92976c145d..80c6ec5d436cd951ce5dba6b3b73a3dc16fb95d7 100755 (executable)
--- a/query.cgi
+++ b/query.cgi
@@ -250,6 +250,11 @@ foreach my $m (@::legal_target_milestone) {
 for (my $i = 0; $i < @products; ++$i) {
     my $p = $products[$i];
     
+    # Bug 190611: band-aid to avoid crashing with no versions defined
+    if (!defined ($::components{$p})) {
+        $::components{$p} = [];
+    }
+    
     # Create hash to hold attributes for each product.
     my %product = (
         'name'       => $p,