#3578 closed defect (bug) (fixed)
`$topic_author` may be incorrect after the 'bbp_new_topic_pre_insert' filter
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.6.14 | Priority: | normal |
| Severity: | minor | Version: | 2.0 |
| Component: | API - Actions/Filters | Keywords: | commit |
| Cc: |
Description (last modified by )
If you use the bbp_new_topic_pre_insert filter to change the authorship of a post (See https://meta.trac.wordpress.org/ticket/6839 for a use-case) the following bbp_new_topic hook will fire with the incorrect data passed.
This is because the hook uses the data from before the filter was run.
As a workaround, one can simply use bbp_get_topic_author_id( $topic_id ) instead of the passed $topic_author of the function.
Note: This applies equally to replies.
I've set the severity to minor, as although it's not ideal, this is not overly unexpected.
Attachments (2)
Change History (6)
Note: See
TracTickets for help on using
tickets.
Patch for 2.6, covers forums/topics/replies