Skip to:
Content

bbPress.org

Opened 5 weeks ago

Last modified 4 weeks ago

#3598 new defect (bug)

bbp_get_all_child_ids() returns trashed posts

Reported by: appideasdotcom's profile appideasdotcom Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 2.6.9
Component: General Keywords:
Cc:

Description

The bbp_get_all_child_ids() function in bbpress/includes/common/functions.php is returning Trashed posts, which should objectively not be the case. There’s no world in which trashed posts should appear unless someone is intentionally digging in the trash.

Line 1997 is currently this:
$not_in = array( 'draft', 'future' );
It should be this instead:
$not_in = array( 'draft', 'future', 'trash' );

I have tested that as a manual change, but this should be bbpress' default behavior, not my locally-hacked override.

Alternatively, you could add a third argument for status overrides. This would make sure that current behavior is not disturbed in case any one is relying on it, even if it is returning flawed results.

Change History (0)

Note: See TracTickets for help on using tickets.