From: lpsolit%gmail.com <> Date: Wed, 15 Nov 2006 03:02:01 +0000 (+0000) Subject: Bug 323031: process_bug.cgi crashes when encountering a deleted user account and... X-Git-Tag: bugzilla-2.23.4~215 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d57079f4b474151515c6c5d298a3ed559943115e;p=thirdparty%2Fbugzilla.git Bug 323031: process_bug.cgi crashes when encountering a deleted user account and when strict_isolation is on - Patch by Frédéric Buclin r=wicked a=justdave --- diff --git a/process_bug.cgi b/process_bug.cgi index d3f52641e4..00594d89e8 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -1342,7 +1342,8 @@ if ($prod_changed && Bugzilla->params->{"strict_isolation"}) { $sth_cc->execute($id); my @blocked_cc = (); while (my ($pid) = $sth_cc->fetchrow_array) { - $usercache{$pid} ||= Bugzilla::User->new($pid); + # Ignore deleted accounts. They will never get notification. + $usercache{$pid} ||= Bugzilla::User->new($pid) || next; my $cc_user = $usercache{$pid}; if (!$cc_user->can_edit_product($product->id)) { push (@blocked_cc, $cc_user->login); @@ -1357,7 +1358,7 @@ if ($prod_changed && Bugzilla->params->{"strict_isolation"}) { $sth_bug->execute($id); my ($assignee, $qacontact) = $sth_bug->fetchrow_array; if (!$assignee_checked) { - $usercache{$assignee} ||= Bugzilla::User->new($assignee); + $usercache{$assignee} ||= Bugzilla::User->new($assignee) || next; my $assign_user = $usercache{$assignee}; if (!$assign_user->can_edit_product($product->id)) { ThrowUserError('invalid_user_group', @@ -1367,7 +1368,7 @@ if ($prod_changed && Bugzilla->params->{"strict_isolation"}) { } } if (!$qacontact_checked && $qacontact) { - $usercache{$qacontact} ||= Bugzilla::User->new($qacontact); + $usercache{$qacontact} ||= Bugzilla::User->new($qacontact) || next; my $qa_user = $usercache{$qacontact}; if (!$qa_user->can_edit_product($product->id)) { ThrowUserError('invalid_user_group',