Closed Bug 190197 Opened 21 years ago Closed 21 years ago

AnyEntryGroups() is broken in globals.pl; call from enter_bug.cgi breaks bug entering

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: jon, Assigned: jon)

Details

Attachments

(2 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20021203
Build Identifier: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20021203

AnyEntryGroups() doesn't check MoreSQLData()'s return value before it calls
FetchSQLData(). FetchSQLData() dies inside of AnyEntryGroups(). i'm attaching a
trivial patch.

Reproducible: Always

Steps to Reproduce:
1. don't have any bug entry groups set in your database (delete from
group_control_map)
2. go to [url]/enter_bug.cgi


Actual Results:  

[Wed Jan 22 14:36:25 2003] [error] [client 172.16.14.80] Premature end of script
headers: enter_bug.cgi
[Wed Jan 22 14:36:25 2003] [error] [client 172.16.14.80] DBD::mysql::st
fetchrow_array failed: fetch() without execute() at Bugzilla/DB.pm line 100
[Wed Jan 22 14:36:25 2003] [error] [client 172.16.14.80]       
Bugzilla::DB::FetchSQLData() called at globals.pl line 484
[Wed Jan 22 14:36:25 2003] [error] [client 172.16.14.80]       
main::AnyEntryGroups() called at /var/www/html/enter_bug.cgi line 65

Expected Results:  
not returned an error.
-> patch author
Assignee: myk → jon
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.18
Comment on attachment 112342 [details] [diff] [review]
fixes problems in AnyEntryGroups()

see also bug 189446 which fixes this error from the other end.	I still want
this one, we want to clean up all the callers eventually. :)
Attachment #112342 - Flags: review+
Flags: approval+
checked in
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
It does not look like the patch made it in.
I am attaching a new simpler patch.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #112342 - Attachment is obsolete: true
CCing timeless because he touched it last.
dunno, I was running into this on Bugscape the other day, and I cvs updated and
it fixed it.
Oops. I messed up. This is really fixed on the trunk. I was working with
bugzilla 2.17.3.

Here is a simpler patch that accomplishes the same thing as the original
patch with fewer steps. (It returns 0 instead of undef, but 0 makes more sense
anyway.)
Attachment #115554 - Attachment is obsolete: true
Comment on attachment 112342 [details] [diff] [review]
fixes problems in AnyEntryGroups()

checked-in patches are not obsolete.
Attachment #112342 - Attachment is obsolete: false
per comment 9 this is already fixed on the trunk.  undoing the REOPEN.

File a new bug as an enhancement to fix it a "better way"
Status: REOPENED → RESOLVED
Closed: 21 years ago21 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.