Closed Bug 288857 Opened 20 years ago Closed 20 years ago

Use of uninitialized value in bitwise and (&) at Bugzilla/User.pm line 984.

Categories

(Bugzilla :: Bugzilla-General, defect)

2.19.2
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: mkanat, Assigned: gerv)

References

Details

Attachments

(1 file, 1 obsolete file)

[Sun Apr 03 10:05:36 2005] [error] [client 216.233.210.105] [Sun Apr 3 10:05:36 2005] process_bug.cgi: Use of uninitialized value in bitwise and (&) at Bugzill a/User.pm line 984., referer: http://landfill.bugzilla.org/mkanat/show_bug.cgi?i d=2323 That's the second line of this: > if ($wants_mail && $changer && ($self->{'login'} eq $changer)) { > $wants_mail &= $self->wants_mail([EVT_CHANGED_BY_ME], $relationship); > }
I'm pretty sure that this can be reproduced just by submitting any change to a bug, as I recall.
Attached patch Patch v.1 (obsolete) — Splinter Review
This fixes the problem. If there were no matches in the SQL, we were getting undef rather than 0. Gerv
Assignee: general → gerv
Status: NEW → ASSIGNED
Attachment #179627 - Flags: review?(LpSolit)
Comment on attachment 179627 [details] [diff] [review] Patch v.1 >+ $wants_mail ||= 0; > > return($wants_mail); > what is returned if the SQL request is successful? You say it return 'true'. Then you should write: return defined($wants_mail) ? 1 : 0; Denying review unless you have a good reason to fix it this way.
Attachment #179627 - Flags: review?(LpSolit) → review-
Gerv, wants_mail() gives no other information except "yes/no", "true/false", right? If so, could you please update your patch considering my previous comment? My log file is full of this error message and makes me very angry!
Flags: blocking2.20?
Target Milestone: --- → Bugzilla 2.20
Attached patch Patch v.2Splinter Review
Here you go :-) Gerv
Attachment #179627 - Attachment is obsolete: true
Attachment #180201 - Flags: review?(LpSolit)
Comment on attachment 180201 [details] [diff] [review] Patch v.2 r=LpSolit
Attachment #180201 - Flags: review?(LpSolit) → review+
Flags: approval?
Flags: approval? → approval+
Gerv, I did the checkin myself. I couldn't wait anymore to see this message out of my log file. :) Checking in Bugzilla/User.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/User.pm,v <-- User.pm new revision: 1.54; previous revision: 1.53 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Flags: blocking2.20?
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: