aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-11-15 04:38:25 +0000
committerlpsolit%gmail.com <>2006-11-15 04:38:25 +0000
commitf3afb66bb75720331b01fe946ab26e5d3b6f0a65 (patch)
tree81e5c2156c4ba46cadce3907b6f31cb1bcf39bc1 /process_bug.cgi
parentBug 321645: [MySQL 5] MySql Error on insert... "DBD::mysql::st execute failed... (diff)
downloadbugzilla-f3afb66bb75720331b01fe946ab26e5d3b6f0a65.tar.gz
bugzilla-f3afb66bb75720331b01fe946ab26e5d3b6f0a65.tar.bz2
bugzilla-f3afb66bb75720331b01fe946ab26e5d3b6f0a65.zip
Bug 323031: process_bug.cgi crashes when encountering a deleted user account and when strict_isolation is on - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wicked a=justdave
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi7
1 files changed, 4 insertions, 3 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index 447d60092..c10fec8a1 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -1370,7 +1370,8 @@ if ($prod_changed && Param("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($prod_id)) {
push (@blocked_cc, $cc_user->login);
@@ -1385,7 +1386,7 @@ if ($prod_changed && Param("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($prod_id)) {
ThrowUserError('invalid_user_group',
@@ -1395,7 +1396,7 @@ if ($prod_changed && Param("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($prod_id)) {
ThrowUserError('invalid_user_group',