From 7c26d8b9218e2c30e94a2375e93ec44e211f1237 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sun, 26 Oct 2008 11:13:28 -0700 Subject: [PATCH] * Handle undefined bugs in the data which is read --- Debbugs/Control.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Debbugs/Control.pm b/Debbugs/Control.pm index 7cb645ed..bedc7d88 100644 --- a/Debbugs/Control.pm +++ b/Debbugs/Control.pm @@ -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; } } -- 2.39.5