Closed Bug 372997 Opened 19 years ago Closed 19 years ago

JavaScript warnings in attachment.js

Categories

(Bugzilla :: Attachments & Requests, defect)

2.23.4
defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: bugzilla, Assigned: reed)

References

()

Details

Attachments

(2 files)

Warning: test for equality (==) mistyped as assignment (=)? Source file: https://bugzilla.mozilla.org/js/attachment.js Line: 96, Column: 52 Source code: if (element = document.getElementById('bigfile')) Warning: test for equality (==) mistyped as assignment (=)? Source file: https://bugzilla.mozilla.org/js/attachment.js Line: 98, Column: 54 Source code: if (element = document.getElementById('attachurl')) { Warning: test for equality (==) mistyped as assignment (=)? Source file: https://bugzilla.mozilla.org/js/attachment.js Line: 104, Column: 54 Source code: if (element = document.getElementById('isprivate'))
Warning: assignment to undeclared variable thisfield Source file: https://bugzilla.mozilla.org/js/attachment.js Line: 76
Attached patch patch - v1Splinter Review
Add another set of parentheses to tell JS that we really want to use = over ==.
Assignee: attach-and-request → reed
Status: NEW → ASSIGNED
Attachment #257638 - Flags: review?(timeless)
Attachment #257638 - Flags: review?(timeless) → review+
Flags: approval?
Flags: approval3.0?
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Bugzilla 3.0
Version: unspecified → 2.23.4
Severity: normal → minor
Flags: approval?
Flags: approval3.0?
Flags: approval3.0+
Flags: approval+
remember to fix the thisfield warning too
tip: Checking in js/attachment.js; /cvsroot/mozilla/webtools/bugzilla/js/attachment.js,v <-- attachment.js new revision: 1.2; previous revision: 1.1 done BUGZILLA-3_0-BRANCH: Checking in js/attachment.js; /cvsroot/mozilla/webtools/bugzilla/js/attachment.js,v <-- attachment.js new revision: 1.1.2.1; previous revision: 1.1 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Fix issue with 'i' and 'thisfield' variables.
Attachment #257641 - Flags: review?(timeless)
Attachment #257641 - Flags: review?(timeless) → review+
Flags: approval?
Flags: approval3.0?
Flags: approval3.0+
Flags: approval+
remember that there are both a thisfield in URLFieldHandler and DataFieldHandler function
(In reply to comment #6) > remember that there are both a thisfield in URLFieldHandler and > DataFieldHandler function Yes, please read the patch. I fixed both. :)
Flags: approval?
Flags: approval3.0?
Flags: approval3.0+
Flags: approval+
tip: Checking in js/attachment.js; /cvsroot/mozilla/webtools/bugzilla/js/attachment.js,v <-- attachment.js new revision: 1.3; previous revision: 1.2 done BUGZILLA-3_0-BRANCH: Checking in js/attachment.js; /cvsroot/mozilla/webtools/bugzilla/js/attachment.js,v <-- attachment.js new revision: 1.1.2.2; previous revision: 1.1.2.1 done
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: