Closed Bug 529157 Opened 15 years ago Closed 15 years ago

Undefined subroutine &Bugzilla::Util::ThrowUserError

Categories

(bugzilla.mozilla.org :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: khuey, Assigned: reed)

References

Details

Attachments

(1 file, 2 obsolete files)

I entered "-1 day" in the timeframe box for a date changed search (I was guessing at the syntax) and got the following error

"Software error:

Undefined subroutine &Bugzilla::Util::ThrowUserError called at /data/www/bugzilla.mozilla.org/Bugzilla/Util.pm line 680.

For help, please send mail to the webmaster (bugzilla-admin@mozilla.org), giving this error message and the time and date of the error."

No idea if this is new with the upgrade, as I've never tried it before (always used the "view bugs filed in the last day" link which seems to be gone).
Attached patch patch - v1 (obsolete) — Splinter Review
Assignee: nobody → reed
Status: NEW → ASSIGNED
Attachment #412732 - Flags: review?(LpSolit)
Component: Bugzilla: Other b.m.o Issues → Bugzilla-General
OS: Windows NT → All
Product: mozilla.org → Bugzilla
QA Contact: other-bmo-issues → default-qa
Hardware: x86 → All
Target Milestone: --- → Bugzilla 3.4
Version: other → 3.4.3
Comment on attachment 412732 [details] [diff] [review]
patch - v1

No, this causes dependency loops. And it's a dupe anyway.
Attachment #412732 - Flags: review?(LpSolit) → review-
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Target Milestone: Bugzilla 3.4 → ---
Wait, this error comes from SqlifyDate(), which doesn't exist upstream in Util.pm. It's a bmo bug.
Assignee: reed → nobody
Status: RESOLVED → REOPENED
Component: Bugzilla-General → Bugzilla: Other b.m.o Issues
Product: Bugzilla → mozilla.org
QA Contact: default-qa → other-bmo-issues
Resolution: DUPLICATE → ---
Version: 3.4.3 → other
Attached patch patch - v2 (obsolete) — Splinter Review
Assignee: nobody → reed
Attachment #412732 - Attachment is obsolete: true
Status: REOPENED → ASSIGNED
Attachment #412736 - Flags: review?(justdave)
Comment on attachment 412736 [details] [diff] [review]
patch - v2

>+        require Bugzilla::Error;
>         ThrowUserError("illegal_date", { date => $str });

If you |require Bugzilla::Error| instead of use'ing it, ThrowUserError() is not imported and so it's still unknown to Bugzilla::Util. You have to write Bugzilla::Error::ThrowUserError() explicitly, despite the |require|.
Attachment #412736 - Flags: review?(justdave) → review-
Attached patch patch - v3Splinter Review
Attachment #412736 - Attachment is obsolete: true
Attachment #413107 - Flags: review?(LpSolit)
Comment on attachment 413107 [details] [diff] [review]
patch - v3

r=LpSolit
Attachment #413107 - Flags: review?(LpSolit) → review+
modified Bugzilla/Util.pm
Committed revision 6718.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
this is now live in production.
Component: Bugzilla: Other b.m.o Issues → General
Product: mozilla.org → bugzilla.mozilla.org
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: