Closed Bug 289002 Opened 20 years ago Closed 20 years ago

cannot set/clear requests with requestee

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

2.19.2
defect
Not set
blocker

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: LpSolit, Assigned: wicked)

Details

(Keywords: regression)

Attachments

(1 file)

when I try to clear requests (some having a requestee), I get the following error:

URL: http://localhost/cvsbugzilla/process_bug.cgi

undef error - Can't use string ("") as an ARRAY ref while "strict refs" in use
at Bugzilla/User.pm line 1021.
OK, please read line 1017 above (I had another patch applied).

    # No mail if there are no events
    return 0 if !scalar(@$events);

This comes from wants_mail().
Flags: blocking2.20?
Summary: cannot clear requests → cannot set/clear requests with requestee
Target Milestone: --- → Bugzilla 2.20
I can't figure out what's going on here. The calls to wants_mail in Flag.pm all
pass array references, yet Perl is complaining that it's a scalar...

Gerv
Perhaps it's these:

/webtools/bugzilla/template/en/default/request/email.txt.tmpl, line 32 -- IF
flag.requestee.wants_mail(constants.EVT_FLAG_REQUESTED) %]
/webtools/bugzilla/template/en/default/request/email.txt.tmpl, line 37 -- IF
flag.setter.wants_mail(constants.EVT_REQUESTED_FLAG) %]

Flags: blocking2.20? → blocking2.20+
Myk was on right track. Those constants seemed to be passed in wrong format for
the wants_mail sub. I wrapped them inside [] which fixed the problem.
Assignee: create-and-change → wicked
Status: NEW → ASSIGNED
Attachment #180136 - Flags: review?(LpSolit)
Comment on attachment 180136 [details] [diff] [review]
Correct constant calls in template, V1

obviously correct. Tested, works!

r=LpSolit

Nice catch! Thanks to myk and wicked! :)
Attachment #180136 - Flags: review?(LpSolit) → review+
Flags: approval?
Flags: approval? → approval+
Checking in template/en/default/request/email.txt.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/request/email.txt.tmpl,v
 <--  email.txt.tmpl
new revision: 1.8; previous revision: 1.7
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Thanks, guys :-)

Gerv
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: