[Pushed] Editing announcement is broken when global variable "$announcement"
#4
Yeah, meant the "isset" - if the request method is post, the variable/announcement is loaded already. If you're accessing it directly (without a post request) the query is always executed. So the if would be:
if(!isset($announcement) || $mybb->request_method != 'post')

Don't know about other places but IMHO we should fix those cases to - "announcement" is a very common variable name, especially for announcement managers (we have at least 3 of them on the mods site).

Edit: Probably even better to check for $mybb->input['action'] != 'do_edit_announcement'.
Support PMs will be ignored!
Reply


Messages In This Thread
RE: Editing announcement is broken when global variable "$announcement" - by Jones H - 2015-06-29, 06:32 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)