Closed Bug 1071033 Opened 10 years ago Closed 10 years ago

[mod_perl] Variable "$user" will not stay shared at buglist.cgi line 537

Categories

(Bugzilla :: Query/Bug List, defect)

4.5.5
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: wicked, Assigned: LpSolit)

References

Details

(Keywords: regression)

Attachments

(1 file)

Restarting a Bugzilla using mod_perl throws following warning/error:

Starting httpd: Variable "$user" will not stay shared at buglist.cgi line 537.

At least affects trunk, didn't check branches.

Also note bug 398883 comment 1 for possible automated test for this in the future.
This is a regression due to bug 281791. It uses $user inside _get_common_flag_types(), but this variable is defined outside the subroutine.
Depends on: 281791
Keywords: regression
Target Milestone: --- → Bugzilla 5.0
Attached patch patch, v1Splinter Review
This patch adds the missing definition of $user in the subroutine, and also removes a useless call to $user->can_set_flag() which is already done by $user->can_request_flag(). I also make the usage of grep consistent:
use grep {} everywhere instead of mixing it with grep().
Assignee: query-and-buglist → LpSolit
Status: NEW → ASSIGNED
Attachment #8495394 - Flags: review?(dkl)
Comment on attachment 8495394 [details] [diff] [review]
patch, v1

Review of attachment 8495394 [details] [diff] [review]:
-----------------------------------------------------------------

r=dkl
Attachment #8495394 - Flags: review?(dkl) → review+
Flags: approval?
Flags: approval? → approval+
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   03c8528..135afc0  master -> master
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: