Closed
Bug 191080
Opened 22 years ago
Closed 22 years ago
process_bug.cgi: SQL error (die) if no component has been selected
Categories
(Bugzilla :: Creating/Changing Bugs, defect, P1)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: burnus, Assigned: bbaetz)
References
Details
Attachments
(1 file)
463 bytes,
patch
|
gerv
:
review+
|
Details | Diff | Splinter Review |
Try to commit a new bug report with no component selected.
Result: Dies in globals.pl's get_component_id with:
DBD::mysql::st execute failed: You have an error in your SQL syntax near '' at
line 1 at Bugzilla/DB.pm line 64
Bugzilla::DB::SendSQL('SELECT id FROM components WHERE product_id = 1
AND name = ') called at globals.pl line 897
main::get_component_id(1, undef) called at
/web/server/zedv/docroot/bugzilla/post_bug.cgi line 110
main::die_with_dignity('DBD::mysql::st execute failed: You have an error
in your SQL syn...') called at Bugzilla/DB.pm line 64
Bugzilla::DB::SendSQL('SELECT id FROM components WHERE product_id = 1
AND name = ') called at globals.pl line 897
main::get_component_id(1, undef) called at
/web/server/zedv/docroot/bugzilla/post_bug.cgi line 110
This is called in process_bug.cgi this way:
if ($::FORM{'component'} ne $::FORM{'dontchange'}) {
if (!defined $prod_id) {
ThrowUserError("no_component_change_for_multiple_products");
}
$comp_id = get_component_id($prod_id,
$::FORM{'component'});
This seems to fail after the recent DBI change. One should check whether
$::FORM{'component'} is set before quering the data base. Either in
get_component_id/get_product_id or in the function call (process_bug.cgi).
Comment 1•22 years ago
|
||
I filed a bug for this today (bug 191043)
Assignee | ||
Comment 2•22 years ago
|
||
Sigh. '' ne "''".
process_bug should still test earlier, though.
Assignee | ||
Updated•22 years ago
|
Attachment #112962 -
Flags: review?(gerv)
Assignee | ||
Comment 3•22 years ago
|
||
*** Bug 191043 has been marked as a duplicate of this bug. ***
Assignee | ||
Updated•22 years ago
|
Severity: normal → critical
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.18
Comment 4•22 years ago
|
||
Comment on attachment 112962 [details] [diff] [review]
oops
r=gerv.
Gerv
Attachment #112962 -
Flags: review?(gerv) → review+
Updated•22 years ago
|
Flags: approval+
Assignee | ||
Comment 5•22 years ago
|
||
Fixed
Status: ASSIGNED → RESOLVED
Closed: 22 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
•