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)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: martin.evans, Assigned: LpSolit)

References

Details

Attachments

(1 file, 3 obsolete files)

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
This might be related/ a duplicate for bug 212962.
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
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; };
This crude hack simply defines $::target_milestone{$::FORM{'product'}} as a new arrayref if it is not already defeined.
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..
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
(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.
All "Software error" messages are critical per justdave.
Severity: normal → critical
Flags: blocking2.20?
Flags: blocking2.18.1?
Flags: blocking2.20?
Flags: blocking2.20+
Flags: blocking2.18.1?
Flags: blocking2.18.1+
Target Milestone: --- → Bugzilla 2.18
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?
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-
Blocks: 271023
Attached patch patch, v1 (obsolete) — Splinter Review
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)
Attached patch patch, v2 (obsolete) — Splinter Review
Updated due to the checkin of a patch from mkanat. :)
Attachment #174584 - Attachment is obsolete: true
Attachment #174629 - Flags: review?(wurblzap)
Attachment #174584 - Flags: review?(wurblzap)
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+
Attached patch patch, v3Splinter Review
Now use my $nb_milestones = scalar(@{$::target_milestone{$oldhash{'product'}}}); as per Marc's comment.
Attachment #174629 - Attachment is obsolete: true
Attachment #175156 - Flags: review+
Flags: approval?
Flags: approval2.18?
Flags: approval?
Flags: approval2.18?
Flags: approval2.18+
Flags: approval+
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
The 2.18 tinderbox is burning. This was the checkin that did it.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
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.
Depends on: 283445
Closing this bug again. Marc opened bug 283445 about that. It has a patch ready for checkin.
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: