Closed
Bug 302200
Opened 19 years ago
Closed 19 years ago
uninitialized value when saving email prefs
Categories
(Bugzilla :: Bugzilla-General, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: robzilla, Assigned: robzilla)
References
Details
Attachments
(1 file, 2 obsolete files)
817 bytes,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
When you save your e-mail prefs and you don't have all of the items in the
"Global options" section checked, you get uninitialized value messages.
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #190553 -
Flags: review?
Assignee | ||
Updated•19 years ago
|
Blocks: bz-warnings
Comment 2•19 years ago
|
||
Comment on attachment 190553 [details] [diff] [review]
robzilla_v1
> foreach my $event (GLOBAL_EVENTS) {
>- if (1 == $cgi->param("email-" . REL_ANY . "-$event")) {
>+ if (defined($cgi->param("email-" . REL_ANY . "-$event")) &&
>+ 1 == $cgi->param("email-" . REL_ANY . "-$event")) {
> $dbh->do("INSERT INTO email_setting " .
> "(user_id, relationship, event) " .
> "VALUES ($userid, " . REL_ANY . ", $event)");
This patch works *but*:
1) if ($cgi->param("email-" . REL_ANY . "-$event")) would suffice. But as this
is done this way in the rest of the file, I won't deny review due to that.
2) This should be written:
if (defined($cgi->())
&& $cgi->() == 1)
{
Please update this patch taking into account my comment 2).
Attachment #190553 -
Flags: review? → review+
Assignee | ||
Comment 3•19 years ago
|
||
ok, nit #2 fixed.
Attachment #190553 -
Attachment is obsolete: true
Attachment #190560 -
Flags: review?(LpSolit)
Comment 4•19 years ago
|
||
Comment on attachment 190560 [details] [diff] [review]
robzilla_v2
>+ if (defined($cgi->param("email-" . REL_ANY . "-$event"))
>+ && $cgi->param("email-" . REL_ANY . "-$event") == 1) {
Reread my previous comment and note the position of the bracket '{'.
If the test can be written on one line:
if ($foo eq $bar) {
....
}
If the test requires several lines:
if ($foo eq $bar
&& $id1 != $id2)
{
...
}
Attachment #190560 -
Flags: review?(LpSolit)
Assignee | ||
Comment 5•19 years ago
|
||
Attachment #190560 -
Attachment is obsolete: true
Assignee | ||
Updated•19 years ago
|
Attachment #190562 -
Flags: review?(LpSolit)
Comment 6•19 years ago
|
||
Comment on attachment 190562 [details] [diff] [review]
robzilla_v3
r=LpSolit
Attachment #190562 -
Flags: review?(LpSolit) → review+
Updated•19 years ago
|
Flags: approval?
Flags: approval2.20?
Target Milestone: --- → Bugzilla 2.20
Updated•19 years ago
|
Flags: approval?
Flags: approval2.20?
Flags: approval2.20+
Flags: approval+
Comment 7•19 years ago
|
||
tip:
Checking in userprefs.cgi;
/cvsroot/mozilla/webtools/bugzilla/userprefs.cgi,v <-- userprefs.cgi
new revision: 1.79; previous revision: 1.78
done
2.20rc1:
Checking in userprefs.cgi;
/cvsroot/mozilla/webtools/bugzilla/userprefs.cgi,v <-- userprefs.cgi
new revision: 1.75.4.3; previous revision: 1.75.4.2
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•