Closed Bug 341453 Opened 18 years ago Closed 18 years ago

Bugzilla::Series looks for functions in global scope that are not global functions

Categories

(Bugzilla :: Reporting/Charting, defect)

2.23
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file, 1 obsolete file)

Bugzilla::Series is full of stuff like this:

&::ThrowCodeError("invalid_series_id",

ThrowCodeError is not a global function. That is, it's looking for it inside of $main, and it's not actually there--it's in Bugzilla::Error. It does the same with detaint_natural, which lives in Bugzilla::Util.

This only works now because globals.pl imports all of these things into the global scope when it's "required" by each script. But once globals.pl goes away, this breaks (as I just discovered when I removed globals.pl from test-checksetup.pl).
Attached patch v1 (obsolete) — Splinter Review
This seems pretty obviously correct to me.
Attachment #225515 - Flags: review?(LpSolit)
Status: NEW → ASSIGNED
Attached patch v2Splinter Review
As LpSolit pointed out on IRC, Bugzilla::Series should use Bugzilla::Error.
Attachment #225515 - Attachment is obsolete: true
Attachment #225517 - Flags: review?(LpSolit)
Attachment #225515 - Flags: review?(LpSolit)
Comment on attachment 225517 [details] [diff] [review]
v2

r=LpSolit
Attachment #225517 - Flags: review?(LpSolit) → review+
Flags: approval?
Flags: approval? → approval+
Checking in Bugzilla/Series.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Series.pm,v  <--  Series.pm
new revision: 1.12; previous revision: 1.11
done
Status: ASSIGNED → RESOLVED
Closed: 18 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: