Closed
Bug 212940
Opened 22 years ago
Closed 20 years ago
Can't use an undefined value as an ARRAY reference at /http/bugzilla/process_bug.cgi line 866.
Categories
(Bugzilla :: Creating/Changing Bugs, defect)
Bugzilla
Creating/Changing Bugs
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: martin.evans, Assigned: LpSolit)
References
Details
Attachments
(1 file, 3 obsolete files)
2.72 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312
Selected multiple bugs to edit, changed the milestone and attempted to accept
the bugs moving to assigned state when this happened:
Content-type: text/html
Software error:
Can't use an undefined value as an ARRAY reference at
/http/bugzilla/process_bug.cgi line 866.
For help, please send mail to the webmaster (martin@easysoft.com), giving this
error message and the time and date of the error.
Reproducible: Always
Steps to Reproduce:
1. Use the make multiple changes
2. select multiple NEW bugs
3. accept them and click commit
Actual Results:
This appeared in the browser:
Content-type: text/html
Software error:
Can't use an undefined value as an ARRAY reference at
/http/bugzilla/process_bug.cgi line 866.
For help, please send mail to the webmaster (martin@easysoft.com), giving this
error message and the time and date of the error.
Expected Results:
I expected the multiple NEW bugs I'd selected to be ACCEPTed.
Bugzilla 2.17.4
Comment 1•22 years ago
|
||
This might be related/ a duplicate for bug 212962.
Updated•22 years ago
|
OS: Linux → All
Hardware: PC → All
*** Bug 212962 has been marked as a duplicate of this bug. ***
The relevant lines appear to be:
if (Param("musthavemilestoneonaccept") &&
scalar(@{$::target_milestone{$::FORM{'product'}}}) > 1) {
This may be related to the fix for bug 125066, which predates both this and the
dup. I can't reproduce, but there have been two reports.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 4•21 years ago
|
||
I get this bug at line 592:
Can't use an undefined value as an ARRAY reference at /path/to/process_bug.cgi
line 592
I am using a patched version of process_bug.cgi
Line 592 is:
if (Param("musthavemilestoneonaccept") &&
here it is in context:
/^accept$/ && CheckonComment( "accept" ) && do {
DoConfirm();
ChangeStatus('ASSIGNED');
if (Param("musthavemilestoneonaccept") &&
scalar(@{$::target_milestone{$::FORM{'product'}}}) > 1) {
if (Param("usetargetmilestone")) {
$requiremilestone = 1;
}
}
last SWITCH;
};
Comment 5•21 years ago
|
||
This crude hack simply defines $::target_milestone{$::FORM{'product'}} as a
new arrayref if it is not already defeined.
Comment 6•20 years ago
|
||
Looks like there's another instance of this bug at line 891 of version 2.18rc3
(haven't upgraded to 2.18 proper yet). The attached patch (attachement #1) fixes
the problem for me..
Comment 7•20 years ago
|
||
Broken for me to:
Can't use an undefined value as an ARRAY reference at
/old/data/jwarren/web/bugzilla/process_bug.cgi line 879
(was trying to move many bugs from 'New' to 'Accepted' with
"musthavemilestoneonaccept" on
Comment 8•20 years ago
|
||
(In reply to comment #7)
> Broken for me to:
>
> Can't use an undefined value as an ARRAY reference at
> /old/data/jwarren/web/bugzilla/process_bug.cgi line 879
>
> (was trying to move many bugs from 'New' to 'Accepted' with
> "musthavemilestoneonaccept" on
Sorry, that's on 2.18 proper.
Comment 9•20 years ago
|
||
All "Software error" messages are critical per justdave.
Severity: normal → critical
Flags: blocking2.20?
Flags: blocking2.18.1?
Updated•20 years ago
|
Flags: blocking2.20?
Flags: blocking2.20+
Flags: blocking2.18.1?
Flags: blocking2.18.1+
Target Milestone: --- → Bugzilla 2.18
Comment 10•20 years ago
|
||
Comment on attachment 141064 [details] [diff] [review]
Crude hack. Defines $::target_milestone{$::FORM{'product'}} if needed
Matisse, assuming you want your patch reviewed, I asked for review for you :)
Attachment #141064 -
Flags: review?
![]() |
Assignee | |
Comment 11•20 years ago
|
||
Comment on attachment 141064 [details] [diff] [review]
Crude hack. Defines $::target_milestone{$::FORM{'product'}} if needed
IMO, this is the wrong way to fix the problem.
The problem when changing the status of several bugs at once from NEW to
ASSIGNED using musthavemilestoneonaccept=1 is that the product is not defined
and then $::target_milestone{$::FORM{'product'}} is also undefined, which
explains why the system complains.
A better solution is to do this check for each product involved.
Attachment #141064 -
Flags: review? → review-
![]() |
Assignee | |
Comment 12•20 years ago
|
||
Check on a per product basis if the target milestone is correctly set. If
several bugs from different products are selected at once and their respective
target milestone is equal to the default milestone of their respective product,
an error message is displayed asking the user to define it first.
Assignee: myk → LpSolit
Attachment #141064 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #174584 -
Flags: review?(wurblzap)
![]() |
Assignee | |
Comment 13•20 years ago
|
||
Updated due to the checkin of a patch from mkanat. :)
Attachment #174584 -
Attachment is obsolete: true
Attachment #174629 -
Flags: review?(wurblzap)
![]() |
Assignee | |
Updated•20 years ago
|
Attachment #174584 -
Flags: review?(wurblzap)
Comment 14•20 years ago
|
||
Comment on attachment 174629 [details] [diff] [review]
patch, v2
I think you're addressing it the right way.
>--- process_bug.cgi 17 Feb 2005 21:57:26 -0000 1.235
>+++ process_bug.cgi 17 Feb 2005 23:17:27 -0000
>+ my $nb_milestones =
>+ $dbh->selectrow_array("SELECT COUNT(*) FROM milestones
>+ WHERE product_id = ?",
>+ undef, $oldhash{'product_id'});
Please make that look at $::target_milestone instead of doing a db lookup and
move r+ forward.
Attachment #174629 -
Flags: review?(wurblzap) → review+
![]() |
Assignee | |
Comment 15•20 years ago
|
||
Now use
my $nb_milestones = scalar(@{$::target_milestone{$oldhash{'product'}}});
as per Marc's comment.
![]() |
Assignee | |
Updated•20 years ago
|
Attachment #174629 -
Attachment is obsolete: true
![]() |
Assignee | |
Updated•20 years ago
|
Attachment #175156 -
Flags: review+
![]() |
Assignee | |
Updated•20 years ago
|
Flags: approval?
Flags: approval2.18?
Updated•20 years ago
|
Flags: approval?
Flags: approval2.18?
Flags: approval2.18+
Flags: approval+
Comment 16•20 years ago
|
||
2.18:
Checking in process_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi
new revision: 1.205.2.13; previous revision: 1.205.2.12
done
Tip:
Checking in process_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi
new revision: 1.237; previous revision: 1.236
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 17•20 years ago
|
||
The 2.18 tinderbox is burning. This was the checkin that did it.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 18•20 years ago
|
||
The error from Tinderbox is:
[Thu Feb 24 07:00:35 2005] process_bug.cgi: Global symbol "$dbh" requires
explicit package name at process_bug.cgi line 1199.
[Thu Feb 24 07:00:35 2005] process_bug.cgi: process_bug.cgi had compilation errors.
![]() |
Assignee | |
Comment 19•20 years ago
|
||
Closing this bug again. Marc opened bug 283445 about that. It has a patch ready
for checkin.
Status: REOPENED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•