Closed Bug 320866 Opened 20 years ago Closed 20 years ago

Watching the same address twice produces software error

Categories

(Bugzilla :: User Accounts, defect)

2.20
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: bugzilla-mozilla, Assigned: LpSolit)

References

Details

Attachments

(1 file)

Watching the same email address twice produces a Software Error. Seen on latest 2.20 branch and Bugzilla CVS. To reproduce: 1. Goto https://bugzilla.mozilla.org/userprefs.cgi?tab=email 2. In 'Users to Watch' enter: bugzilla-mozilla@bkor.dhs.org,bugzilla-mozilla@bkor.dhs.org 3. Click 'Submit Changes' 4. Get error Error given: DBD::mysql::st execute failed: Duplicate entry '5407-106963' for key 1 [for Statement "INSERT INTO watch (watched, watcher) VALUES (?, ?)"] at userprefs.cgi line 302 main::SaveEmail() called at userprefs.cgi line 426 Also works when you add an email address you are already watching.
Attached patch patch, v1Splinter Review
Assignee: user-accounts → LpSolit
Status: NEW → ASSIGNED
Attachment #206332 - Flags: review?(wicked)
Comment on attachment 206332 [details] [diff] [review] patch, v1 Code changes array to hash to prevent duplicate entries, the pulls entries back out using keys. Works as expected.
Attachment #206332 - Flags: review+
Attachment #206332 - Flags: review?(wicked)
Comment on attachment 206332 [details] [diff] [review] patch, v1 Works on latest 2.20 branch. Applies with harmless offset error.
Attachment #206332 - Flags: review+
Flags: approval?
Flags: approval2.20?
Target Milestone: --- → Bugzilla 2.20
Flags: approval?
Flags: approval2.20?
Flags: approval2.20+
Flags: approval+
tip: Checking in userprefs.cgi; /cvsroot/mozilla/webtools/bugzilla/userprefs.cgi,v <-- userprefs.cgi new revision: 1.94; previous revision: 1.93 done 2.20: Checking in userprefs.cgi; /cvsroot/mozilla/webtools/bugzilla/userprefs.cgi,v <-- userprefs.cgi new revision: 1.75.4.6; previous revision: 1.75.4.5 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
*** Bug 328615 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: