Closed
Bug 819330
Opened 12 years ago
Closed 12 years ago
Bugzilla crashes when cloning a bug if the CC list is empty
Categories
(Bugzilla :: Creating/Changing Bugs, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.4
People
(Reporter: jolum1, Assigned: LpSolit)
References
Details
(Keywords: regression)
Attachments
(1 file)
1.81 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 Build ID: 20121128204232 Steps to reproduce: Attempted to clone an existing bug where the logged in user was not the reporter. Actual results: Bugzilla reported the following: Software error: Can't use an undefined value as an ARRAY reference at /var/www/bugzilla/enter_bug.cgi line 217. Expected results: In BZ v4.5 the code at line 217 reads: if ($cloned_bug->reporter->id != $user->id) && none { $_ eq $cloned_bug->reporter->login } @{$cloned_bug->cc}) { $vars->{'cc'} = join (", ", $cloned_bug->reporter->login, $vars->{'cc'}); } In our previous version (3.4) it use to read: if ($cloned_bug->reporter->id != $user->id) { $vars->{'cc'} = join (", ", $cloned_bug->reporter->login, $vars->{'cc'}); }
Assignee | ||
Comment 1•12 years ago
|
||
Confirmed. This happens only if there is nobody in the CC list of the original bug. This is a regression due to bug 715432.
Assignee: general → create-and-change
Status: UNCONFIRMED → NEW
Component: Bugzilla-General → Creating/Changing Bugs
Depends on: 715432
Ever confirmed: true
Flags: blocking4.4+
Keywords: regression
Summary: Error cloning bug → Bugzilla crashes when cloning a bug if the CC list is empty
Target Milestone: --- → Bugzilla 4.4
Assignee | ||
Comment 2•12 years ago
|
||
The right fix is to make $bug->cc always return an arrayref. It doesn't make sense to return undef when the CC list is empty. Else this always force the callers to do something like @{$bug->cc || []} which is ridiculous.
Assignee: create-and-change → LpSolit
Status: NEW → ASSIGNED
Attachment #689728 -
Flags: review?(dkl)
Comment 3•12 years ago
|
||
Comment on attachment 689728 [details] [diff] [review] patch, v1 Review of attachment 689728 [details] [diff] [review]: ----------------------------------------------------------------- Works as expected. r=dkl
Attachment #689728 -
Flags: review?(dkl) → review+
Updated•12 years ago
|
Flags: approval?
Flags: approval4.4?
Assignee | ||
Updated•12 years ago
|
Flags: approval?
Flags: approval4.4?
Flags: approval4.4+
Flags: approval+
Assignee | ||
Comment 4•12 years ago
|
||
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/ modified enter_bug.cgi modified Bugzilla/Bug.pm modified Bugzilla/WebService/Bug.pm Committed revision 8520. Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.4/ modified enter_bug.cgi modified Bugzilla/Bug.pm modified Bugzilla/WebService/Bug.pm Committed revision 8485.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•