Closed Bug 298509 Opened 19 years ago Closed 19 years ago

Numeric comparison on uninitialized value in editwines.cgi

Categories

(Bugzilla :: Whining, defect)

2.19.3
defect
Not set
trivial

Tracking

()

RESOLVED DUPLICATE of bug 298507

People

(Reporter: karl, Assigned: erik)

References

Details

Attachments

(1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) In editwhines.cgi (the tip version), the following appears on line 194: > if ($cgi->param("mailto_type_$sid") == MAILTO_USER) { This results in an uninitialized value warning if "mailto_type_$sid" is not defined. Specifically, it generated the folloeing in error_log: editwhines.cgi: Use of uninitialized value in numeric eq (==) at /Library/WebServer/Documents/bugzilla-new/editwhines.cgi line 194. Reproducible: Sometimes Steps to Reproduce: So far, this has only happened on my first attempt to create a whine. It has not appeared since then.
Blocks: bz-warnings
Version: unspecified → 2.19.3
Modifies the 'if' to first check that the variable is defined before going onto the numeric comparison. This assumes that the bug is actually real, and not invalid.
Attachment #187060 - Flags: review?(erik)
Comment on attachment 187060 [details] [diff] [review] Checks for defined-ness before doing comparison This was accidentally submitted using an old account. Removing review pending updated submission from my real account.
Attachment #187060 - Flags: review?(erik)
Attachment #187060 - Attachment is obsolete: true
please fix that in bug 298507. It's meaningless to open a new bug for each warning you get in error_log when related to the same file. *** This bug has been marked as a duplicate of 298507 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: