Opened 3 weeks ago
Closed 3 weeks ago
#3696 closed defect (bug) (fixed)
Forum status AND check ignores an intermediate closed category
| Reported by: | johnjamesjacoby | Owned by: | johnjamesjacoby |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.6.20 |
| Component: | Component - Forums | Version: | 2.6.19 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
The documented AND behavior of bbp_is_forum_status() requires the forum and every category ancestor to match. With an open forum inside a closed category inside an open category, bbp_is_forum_status( $forum_id, 'open', true, 'AND' ) returns true instead of false.
The ancestor loop replaces the result for each category, so a matching outer category can erase an earlier mismatch. Accumulate the category results according to the selected AND or OR operator, preserving the existing filter arguments and non-category ancestor behavior. Add a nested-category PHPUnit regression test.
The issue is present in 2.6.19. Fix on trunk and backport to branches/2.6 for 2.6.20. The broader forum-template test coverage remains tracked in #3695.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 7768: