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:
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'.
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!