[Pushed] Editing announcement is broken when global variable "$announcement"
Either the linked lines are outdated or I don't understand what's wrong.

EDIT: and if you mean the 2 conditionals above, which you most likely do - won't adding request_method == "post" to the 1st check skip the query when you're accessing the action directly, which would break it completely? Unless you meant adding that condition as an alternative rather than &&:
if(!isset($announcement) || $mybb->request_method == 'post')
but then this optimisation is kind of pointless since the query will be always executed.

EDIT2: the same thing happens probably in many places btw, I just remembered that I accidentally broke quick reply in one of my plugins by similarly globalizing $post['xxx'] in a global hook. This line fired off: https://github.com/mybb/mybb/blob/featur...ly.php#L86 Not sure if that's something we can/should fix everywhere.

Messages In This Thread
RE: Editing announcement is broken when global variable "$announcement" - by Destroy666 - 2015-06-28, 03:27 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)