Closed Bug 572603 Opened 15 years ago Closed 15 years ago

If $action eq 'none' in process_bug.cgi, recent_search_for dies

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
Bugzilla 4.0

People

(Reporter: mkanat, Assigned: mkanat)

Details

Attachments

(1 file)

If there's no "bug" object passed to the template in navigate.html.tmpl, recent_search_for dies. I think that's probably OK--it helps us catch errors in how we're calling the templates. However, we should certainly be setting $vars->{bug} to something sensible so that this error stops happening.
How do you trigger this crash exactly?
Update any bug on HEAD that isn't in your list, or just don't have a list.
Attached patch v1Splinter Review
Okay, in fact this is actually exposing a minor bug that would happen when updating bugs not in your list--you'd get a navigation bar, but it would *always* be empty, because there was no bug object. So I simply don't show the navigation bar if there isn't a bug object, now.
Assignee: create-and-change → mkanat
Status: NEW → ASSIGNED
Attachment #453484 - Flags: review?(LpSolit)
Attachment #453484 - Flags: review?(LpSolit) → review?(timello)
Comment on attachment 453484 [details] [diff] [review] v1 >+[% RETURN IF !bug %] I think you should also fix recent_search_for() in Bugzilla/User.pm to return undef when $bug is undefined. r=LpSolit
Attachment #453484 - Flags: review?(timello) → review+
Flags: approval+
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/ modified template/en/default/bug/navigate.html.tmpl Committed revision 7240.
Status: ASSIGNED → RESOLVED
Closed: 15 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: