]> git.donarmstrong.com Git - debbugs.git/commitdiff
* Handle undefined bugs in the data which is read
authorDon Armstrong <don@donarmstrong.com>
Sun, 26 Oct 2008 18:13:28 +0000 (11:13 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sun, 26 Oct 2008 18:13:28 +0000 (11:13 -0700)
Debbugs/Control.pm

index 7cb645ed4f4aa65cd9693b48a927f3b58f20aac2..bedc7d88a6f3445c67ee253ecd9e1a91dcea05b4 100644 (file)
@@ -826,7 +826,7 @@ sub bug_unarchive {
         die "No bug found for $param{bug}";
      }
      print {$debug} "$param{bug} read done\n";
-     my @bugs = map {$_->{bug_num}} @data;
+     my @bugs = map {(defined $_ and exists $_->{bug_num} and defined $_->{bug_num})?$_->{bug_num}:()} @data;
      print {$debug} "$param{bug} bugs ".join(' ',@bugs)."\n";
      print {$debug} "$param{bug} unarchiving\n";
      my @files_to_remove;
@@ -974,6 +974,7 @@ sub __handle_affected_packages{
                               allow_extra => 1,
                              );
      for my $data (make_list($param{data})) {
+         next unless exists $data->{package} and defined $data->{package};
          $param{affected_packages}{$data->{package}} = 1;
      }
 }